DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RosenProffittLocalLengthEstimator.h
1 
17 #pragma once
18 
34 #if defined(RosenProffittLocalLengthEstimator_RECURSES)
35 #error Recursive header files inclusion detected in RosenProffittLocalLengthEstimator.h
36 #else // defined(RosenProffittLocalLengthEstimator_RECURSES)
37 
38 #define RosenProffittLocalLengthEstimator_RECURSES
39 
40 #if !defined RosenProffittLocalLengthEstimator_h
41 
42 #define RosenProffittLocalLengthEstimator_h
43 
45 // Inclusions
46 #include <iostream>
47 #include "DGtal/base/Common.h"
48 #include "DGtal/geometry/curves/estimation/TwoStepLocalLengthEstimator.h"
50 
51 namespace DGtal
52 {
53 
55  // template class RosenProffittLocalLengthEstimator
68  template <typename TConstIterator>
70  {
71  // ----------------------- Standard services ------------------------------
72  public:
73 
74 
76  typedef TConstIterator ConstIterator;
77  typedef double Quantity;
78 
79 
84  TwoStepLocalLengthEstimator<TConstIterator>(M_PI*(sqrt(2.0f)+1.0)/8.0,
85  M_PI*(sqrt(2.0f)+2.0)/16.0)
86  {}
87 
88 
89 
90  // ----------------------- Interface --------------------------------------
91  public:
92 
97  void selfDisplay ( std::ostream & out ) const
98  {
99  out << "[RosenProffittLocalLengthEstimator]";
100  if (this->myIsInitBefore)
101  out <<" myH="<< this->myH;
102  else
103  out<< " not initialized";
104  }
105 
106 
107  private:
108 
115 
123 
124  // ------------------------- Internals ------------------------------------
125  private:
126 
127  }; // end of class RosenProffittLocalLengthEstimator
128 
129 
136  template <typename T>
137  std::ostream&
138  operator<< ( std::ostream & out, const RosenProffittLocalLengthEstimator<T> & object );
139 
140 } // namespace DGtal
141 
142 // //
144 
145 #endif // !defined RosenProffittLocalLengthEstimator_h
146 
147 #undef RosenProffittLocalLengthEstimator_RECURSES
148 #endif // else defined(RosenProffittLocalLengthEstimator_RECURSES)