DGtal  1.3.beta
FPLengthEstimator.h
1 
17 #pragma once
18 
37 #if defined(FPLengthEstimator_RECURSES)
38 #error Recursive header files inclusion detected in FPLengthEstimator.h
39 #else // defined(FPLengthEstimator_RECURSES)
40 
41 #define FPLengthEstimator_RECURSES
42 
43 #if !defined FPLengthEstimator_h
44 
45 #define FPLengthEstimator_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 FPLengthEstimator
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::Point Point;
82  typedef typename FaithfulPolygon::Vector Vector;
83 
87  FPLengthEstimator() = default;
88 
89 
93  ~FPLengthEstimator() = default;
94 
100  FPLengthEstimator ( const FPLengthEstimator & other ) = delete;
101 
108  FPLengthEstimator & operator= ( const FPLengthEstimator & other ) = delete;
109 
110  // ----------------------- Interface --------------------------------------
111  public:
112 
122  Quantity eval( const ConstIterator& itb,
123  const ConstIterator& ite,
124  const double h = 1. ) const;
125 
130  void selfDisplay ( std::ostream & out ) const;
131 
136  bool isValid() const;
137 
138  }; // end of class FPLengthEstimator
139 
140 
147  template <typename T>
148  std::ostream&
149  operator<< ( std::ostream & out, const FPLengthEstimator<T> & object );
150 
151 } // namespace DGtal
152 
153 
155 // Includes inline functions.
156 #include "DGtal/geometry/curves/estimation/FPLengthEstimator.ih"
157 
158 // //
160 
161 #endif // !defined FPLengthEstimator_h
162 
163 #undef FPLengthEstimator_RECURSES
164 #endif // else defined(FPLengthEstimator_RECURSES)
DGtal::FPLengthEstimator::eval
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
DGtal::FPLengthEstimator::FaithfulPolygon
FP< ConstIterator, int, 4 > FaithfulPolygon
Definition: FPLengthEstimator.h:80
DGtal::FPLengthEstimator::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::FPLengthEstimator::operator=
FPLengthEstimator & operator=(const FPLengthEstimator &other)=delete
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::FPLengthEstimator::ConstIterator
TConstIterator ConstIterator
Definition: FPLengthEstimator.h:76
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::FP
Aim: Computes the faithful polygon (FP) of a range of 4/8-connected 2D Points.
Definition: FP.h:292
DGtal::FPLengthEstimator::Vector
FaithfulPolygon::Vector Vector
Definition: FPLengthEstimator.h:82
DGtal::FPLengthEstimator::FPLengthEstimator
FPLengthEstimator()=default
DGtal::FPLengthEstimator::Quantity
double Quantity
Definition: FPLengthEstimator.h:78
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
DGtal::FPLengthEstimator
Aim: a model of CGlobalCurveEstimator that computes the length of a digital curve using its FP (faith...
Definition: FPLengthEstimator.h:69
DGtal::FPLengthEstimator::isValid
bool isValid() const
DGtal::FPLengthEstimator::Point
FaithfulPolygon::Point Point
Definition: FPLengthEstimator.h:81
DGtal::FPLengthEstimator::~FPLengthEstimator
~FPLengthEstimator()=default