DGtal  1.1.0
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 
83 
87  MLPLengthEstimator() = default;
88 
89 
93  ~MLPLengthEstimator() = default;
94 
95 
101  MLPLengthEstimator ( const MLPLengthEstimator & other ) = delete;
102 
109  MLPLengthEstimator & operator= ( const MLPLengthEstimator & other ) = delete;
110 
111  // ----------------------- Interface --------------------------------------
112  public:
113 
124  const ConstIterator& ite,
125  const double h = 1. ) const;
126 
131  void selfDisplay ( std::ostream & out ) const;
132 
137  bool isValid() const;
138 
139  }; // end of class MLPLengthEstimator
140 
141 
148  template <typename T>
149  std::ostream&
150  operator<< ( std::ostream & out, const MLPLengthEstimator<T> & object );
151 
152 } // namespace DGtal
153 
154 
156 // Includes inline functions.
157 #include "DGtal/geometry/curves/estimation/MLPLengthEstimator.ih"
158 
159 // //
161 
162 #endif // !defined MLPLengthEstimator_h
163 
164 #undef MLPLengthEstimator_RECURSES
165 #endif // else defined(MLPLengthEstimator_RECURSES)
DGtal::MLPLengthEstimator::MLPLengthEstimator
MLPLengthEstimator()=default
DGtal::MLPLengthEstimator::Point
FaithfulPolygon::RealPoint Point
Definition: MLPLengthEstimator.h:81
DGtal::MLPLengthEstimator
Aim: a model of CGlobalCurveEstimator that computes the length of a digital curve using its MLP (give...
Definition: MLPLengthEstimator.h:70
DGtal::MLPLengthEstimator::isValid
bool isValid() const
DGtal::MLPLengthEstimator::eval
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
DGtal::MLPLengthEstimator::FaithfulPolygon
FP< ConstIterator, int, 4 > FaithfulPolygon
Definition: MLPLengthEstimator.h:80
DGtal::MLPLengthEstimator::Quantity
double Quantity
Definition: MLPLengthEstimator.h:78
DGtal::MLPLengthEstimator::Vector
FaithfulPolygon::RealVector Vector
Definition: MLPLengthEstimator.h:82
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::FP
Aim: Computes the faithful polygon (FP) of a range of 4/8-connected 2D Points.
Definition: FP.h:293
DGtal::MLPLengthEstimator::MLPLengthEstimator
MLPLengthEstimator(const MLPLengthEstimator &other)=delete
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::MLPLengthEstimator::~MLPLengthEstimator
~MLPLengthEstimator()=default
DGtal::PointVector< 2, double >
DGtal::MLPLengthEstimator::ConstIterator
TConstIterator ConstIterator
Definition: MLPLengthEstimator.h:76
DGtal::MLPLengthEstimator::operator=
MLPLengthEstimator & operator=(const MLPLengthEstimator &other)=delete
DGtal::MLPLengthEstimator::selfDisplay
void selfDisplay(std::ostream &out) const