DGtal  0.9.2
TrueLocalEstimatorOnPoints.h
1 
17 #pragma once
18 
34 #if defined(TrueLocalEstimatorOnPoints_RECURSES)
35 #error Recursive header files inclusion detected in TrueLocalEstimatorOnPoints.h
36 #else // defined(TrueLocalEstimatorOnPoints_RECURSES)
37 
38 #define TrueLocalEstimatorOnPoints_RECURSES
39 
40 #if !defined TrueLocalEstimatorOnPoints_h
41 
42 #define TrueLocalEstimatorOnPoints_h
43 
45 // Inclusions
46 #include <iostream>
47 #include "DGtal/base/Common.h"
49 
50 namespace DGtal
51 {
53  // template class TrueLocalEstimatorOnPoints
65  template <typename TConstIteratorOnPoints,
66  typename TParametricShape,
67  typename TParametricShapeFunctor>
69  {
70 
71  // ----------------------- Types ------------------------------
72  public:
73 
74  typedef TConstIteratorOnPoints ConstIterator;
75 
76  typedef TParametricShape ParametricShape;
77  typedef typename TParametricShape::RealPoint RealPoint;
78 
79  typedef TParametricShapeFunctor ParametricShapeFunctor;
80  typedef typename ParametricShapeFunctor::Quantity Quantity;
81 
82 
83  // ----------------------- Standard services ------------------------------
84  public:
85 
90 
91 
96 
97  // ----------------------- Interface --------------------------------------
98  public:
99 
106  void init(const double h,
107  const ConstIterator& itb,
108  const ConstIterator& ite);
109 
114  void attach(ParametricShape* aShapePtr);
115 
120  Quantity eval(const ConstIterator& it) const;
121 
130  template <typename OutputIterator>
131  OutputIterator eval(const ConstIterator& itb,
132  const ConstIterator& ite,
133  OutputIterator result) const;
134 
135 
140  bool isValid() const;
141 
142  // ------------------------- Protected Datas ------------------------------
143  protected:
144 
145  // ------------------------- Private Datas --------------------------------
146  private:
147 
149  double myH;
150 
152  ConstIterator myBegin;
153 
155  ConstIterator myEnd;
156 
158  ParametricShapeFunctor* myFunctorPtr;
159 
160  // ------------------------- Hidden services ------------------------------
161  private:
162 
169 
177 
178 
179  }; // end of class TrueLocalEstimatorOnPoints
180 
181 } // namespace DGtal
182 
183 
185 // Includes inline functions.
186 #include "DGtal/geometry/curves/estimation/TrueLocalEstimatorOnPoints.ih"
187 
188 // //
190 
191 #endif // !defined TrueLocalEstimatorOnPoints_h
192 
193 #undef TrueLocalEstimatorOnPoints_RECURSES
194 #endif // else defined(TrueLocalEstimatorOnPoints_RECURSES)
ConstIterator myBegin
Copy of the begin iterator.
ParametricShapeFunctor * myFunctorPtr
Owning pointer on a parametric shape functor.
ParametricShapeFunctor::Quantity Quantity
Quantity eval(const ConstIterator &it) const
TrueLocalEstimatorOnPoints & operator=(const TrueLocalEstimatorOnPoints &other)
void attach(ParametricShape *aShapePtr)
ConstIterator myEnd
Copy of the end iterator.
void init(const double h, const ConstIterator &itb, const ConstIterator &ite)
Aim: Computes the true quantity to each element of a range associated to a parametric shape...
DGtal is the top-level namespace which contains all DGtal functions and types.