DGtal 1.3.0
Loading...
Searching...
No Matches
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)
41#define FPLengthEstimator_RECURSES
42
43#if !defined FPLengthEstimator_h
45#define FPLengthEstimator_h
46
48// Inclusions
49#include <iostream>
50#include "DGtal/base/Common.h"
51#include "DGtal/geometry/curves/FP.h"
53
54namespace 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;
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
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)
Aim: a model of CGlobalCurveEstimator that computes the length of a digital curve using its FP (faith...
FP< ConstIterator, int, 4 > FaithfulPolygon
void selfDisplay(std::ostream &out) const
Quantity eval(const ConstIterator &itb, const ConstIterator &ite, const double h=1.) const
FPLengthEstimator(const FPLengthEstimator &other)=delete
FaithfulPolygon::Point Point
FaithfulPolygon::Vector Vector
FPLengthEstimator & operator=(const FPLengthEstimator &other)=delete
Aim: Computes the faithful polygon (FP) of a range of 4/8-connected 2D Points.
Definition: FP.h:293
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)