DGtal  1.4.beta
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)
41 #define MLPLengthEstimator_RECURSES
42 
43 #if !defined MLPLengthEstimator_h
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)
Aim: Computes the faithful polygon (FP) of a range of 4/8-connected 2D Points.
Definition: FP.h:293
Aim: a model of CGlobalCurveEstimator that computes the length of a digital curve using its MLP (give...
MLPLengthEstimator & operator=(const MLPLengthEstimator &other)=delete
FaithfulPolygon::RealVector Vector
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
void selfDisplay(std::ostream &out) const
FaithfulPolygon::RealPoint Point
FP< ConstIterator, int, 4 > FaithfulPolygon
MLPLengthEstimator(const MLPLengthEstimator &other)=delete
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)