DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MLPLengthEstimator.h
1 
17 #pragma once
18 
37 #if defined(MLPLengthEstimator_RECURSES)
38 #error Recursive header files inclusion detected in MLPLengthEstimator.h
39 #else // defined(MLPLengthEstimator_RECURSES)
40 
41 #define MLPLengthEstimator_RECURSES
42 
43 #if !defined MLPLengthEstimator_h
44 
45 #define MLPLengthEstimator_h
46 
48 // Inclusions
49 #include <iostream>
50 #include "DGtal/base/Common.h"
51 #include "DGtal/geometry/curves/FP.h"
53 
54 namespace DGtal
55 {
56 
58  // template class MLPLengthEstimator
68  template <typename TConstIterator>
70  {
71  // ----------------------- Standard services ------------------------------
72  public:
73 
74 
76  typedef TConstIterator ConstIterator;
77 
78  typedef double Quantity;
79 
81  typedef typename FaithfulPolygon::RealPoint Point;
83 
88 
89 
94 
95 
96  // ----------------------- Interface --------------------------------------
97  public:
98 
107  void init( const double h, const ConstIterator& itb, const ConstIterator& ite, const bool& isClosed);
108 
109 
117  Quantity eval( ) const;
118 
119 
124  void selfDisplay ( std::ostream & out ) const;
125 
130  bool isValid() const;
131 
132  // ------------------------- Private Datas --------------------------------
133  private:
134 
136  double myH;
137 
139  std::vector<Point> myRep;
140 
143 
144  private:
145 
151  MLPLengthEstimator ( const MLPLengthEstimator & other );
152 
160 
161  // ------------------------- Internals ------------------------------------
162  private:
163 
164  }; // end of class MLPLengthEstimator
165 
166 
173  template <typename T>
174  std::ostream&
175  operator<< ( std::ostream & out, const MLPLengthEstimator<T> & object );
176 
177 } // namespace DGtal
178 
179 
181 // Includes inline functions.
182 #include "DGtal/geometry/curves/estimation/MLPLengthEstimator.ih"
183 
184 // //
186 
187 #endif // !defined MLPLengthEstimator_h
188 
189 #undef MLPLengthEstimator_RECURSES
190 #endif // else defined(MLPLengthEstimator_RECURSES)