DGtal  1.1.0
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 
94 
102 
103  // ----------------------- Interface --------------------------------------
104  public:
105 
110  void selfDisplay ( std::ostream & out ) const
111  {
112  out << "[RosenProffittLocalLengthEstimator]";
113  if (this->isValid())
114  out <<" initialized";
115  else
116  out<< " not initialized";
117  }
118 
119  }; // end of class RosenProffittLocalLengthEstimator
120 
121 
128  template <typename T>
129  std::ostream&
130  operator<< ( std::ostream & out, const RosenProffittLocalLengthEstimator<T> & object );
131 
132 } // namespace DGtal
133 
134 // //
136 
137 #endif // !defined RosenProffittLocalLengthEstimator_h
138 
139 #undef RosenProffittLocalLengthEstimator_RECURSES
140 #endif // else defined(RosenProffittLocalLengthEstimator_RECURSES)
DGtal::TwoStepLocalLengthEstimator
Aim: a simple model of CGlobalCurveEstimator that compute the length of a curve using the l_1 metric ...
Definition: TwoStepLocalLengthEstimator.h:66
DGtal::RosenProffittLocalLengthEstimator::RosenProffittLocalLengthEstimator
RosenProffittLocalLengthEstimator()
Definition: RosenProffittLocalLengthEstimator.h:83
DGtal::RosenProffittLocalLengthEstimator::selfDisplay
void selfDisplay(std::ostream &out) const
Definition: RosenProffittLocalLengthEstimator.h:110
DGtal::RosenProffittLocalLengthEstimator::Quantity
double Quantity
Definition: RosenProffittLocalLengthEstimator.h:77
DGtal::TwoStepLocalLengthEstimator::isValid
bool isValid() const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::RosenProffittLocalLengthEstimator::RosenProffittLocalLengthEstimator
RosenProffittLocalLengthEstimator(const RosenProffittLocalLengthEstimator &other)=delete
DGtal::RosenProffittLocalLengthEstimator
Aim: Rosen-Proffitt Length Estimator.
Definition: RosenProffittLocalLengthEstimator.h:70
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::RosenProffittLocalLengthEstimator::operator=
RosenProffittLocalLengthEstimator & operator=(const RosenProffittLocalLengthEstimator &other)=delete
DGtal::RosenProffittLocalLengthEstimator::ConstIterator
TConstIterator ConstIterator
Definition: RosenProffittLocalLengthEstimator.h:76