DGtal 2.0.0
Loading...
Searching...
No Matches
TrueDigitalSurfaceLocalEstimator.h
1
16
17#pragma once
18
30
31#if defined(TrueDigitalSurfaceLocalEstimator_RECURSES)
32#error Recursive header files inclusion detected in TrueDigitalSurfaceLocalEstimator.h
33#else // defined(TrueDigitalSurfaceLocalEstimator_RECURSES)
35#define TrueDigitalSurfaceLocalEstimator_RECURSES
36
37#if !defined TrueDigitalSurfaceLocalEstimator_h
39#define TrueDigitalSurfaceLocalEstimator_h
40
42// Inclusions
43#include <iostream>
44#include "DGtal/base/Common.h"
45#include "DGtal/base/ConstAlias.h"
46#include "DGtal/base/CountedConstPtrOrConstPtr.h"
47#include "DGtal/topology/CanonicSCellEmbedder.h"
49
50namespace DGtal
51{
52
54 // template class TrueDigitalSurfaceLocalEstimator
96 template <typename TKSpace, typename TShape, typename TGeometricFunctor>
98 {
100
101 public:
103 typedef TKSpace KSpace;
104 typedef TShape Shape;
105 typedef TGeometricFunctor GeometricFunctor;
106 typedef typename KSpace::Space Space;
107 typedef typename KSpace::SCell SCell;
108 typedef typename KSpace::Surfel Surfel;
109 typedef typename Space::RealPoint RealPoint;
111 typedef typename GeometricFunctor::Quantity Quantity;
114
115 // ----------------------- Standard services ------------------------------
116 public:
117
122
127
133
139 Self& operator=( const Self & other );
140
142 Scalar h() const;
143
150 void attach( ConstAlias<Shape> aShape );
151
169 const int maxIter = 20,
170 const Scalar accuracy = 0.0001,
171 const Scalar gamma = 0.5 );
172
181 template <typename SurfelConstIterator>
182 void init( const Scalar _h,
183 SurfelConstIterator itb,
184 SurfelConstIterator ite );
185
190 template <typename SurfelConstIterator>
191 Quantity eval( SurfelConstIterator it ) const;
192
200 template <typename OutputIterator, typename SurfelConstIterator>
201 OutputIterator eval( SurfelConstIterator itb,
202 SurfelConstIterator ite,
203 OutputIterator result ) const;
204
209 RealPoint embed( Surfel surfel ) const;
210
211 // ----------------------- Interface --------------------------------------
212 public:
213
218 void selfDisplay ( std::ostream & out ) const;
219
224 bool isValid() const;
225
226 // ------------------------- Protected Datas ------------------------------
227 protected:
240
247
248 // ------------------------- Private Datas --------------------------------
249 private:
250
251 // ------------------------- Hidden services ------------------------------
252 protected:
253
254 private:
255
256
257 // ------------------------- Internals ------------------------------------
258 private:
259
260 }; // end of class TrueDigitalSurfaceLocalEstimator
261
262
269 template <typename TKSpace, typename TShape, typename TGeometricFunctor>
270 std::ostream&
272
273} // namespace DGtal
274
275
277// Includes inline functions.
278#include "DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.ih"
279
280// //
282
283#endif // !defined TrueDigitalSurfaceLocalEstimator_h
284
285#undef TrueDigitalSurfaceLocalEstimator_RECURSES
286#endif // else defined(TrueDigitalSurfaceLocalEstimator_RECURSES)
Aim: This class encapsulates its parameter class to indicate that the given parameter is required to ...
Definition Clone.h:266
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition ConstAlias.h:187
Aim: Smart or simple const pointer on T. It can be a smart pointer based on reference counts or a sim...
Aim: Copy on write shared pointer.
Definition CowPtr.h:68
SignedKhalimskyCell< dim, Integer > SCell
PointVector< dim, double > RealPoint
Definition SpaceND.h:117
Aim: An estimator on digital surfaces that returns the reference local geometric quantity....
void init(const Scalar _h, SurfelConstIterator itb, SurfelConstIterator ite)
Quantity eval(SurfelConstIterator it) const
RealPoint embed(Surfel surfel) const
TrueDigitalSurfaceLocalEstimator(const Self &other)
BOOST_CONCEPT_ASSERT((concepts::CCellularGridSpaceND< TKSpace >))
void selfDisplay(std::ostream &out) const
TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor > Self
Self & operator=(const Self &other)
BOOST_CONCEPT_ASSERT((concepts::CUnaryFunctor< GeometricFunctor, RealPoint, Quantity >))
OutputIterator eval(SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator result) const
void setParams(ConstAlias< KSpace > ks, Clone< GeometricFunctor > fct, const int maxIter=20, const Scalar accuracy=0.0001, const Scalar gamma=0.5)
void attach(ConstAlias< Shape > aShape)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: A trivial embedder for signed cell, which corresponds to the canonic injection of cell centroids...
Aim: This concept describes a cellular grid space in nD. In these spaces obtained by cartesian produc...
Aim: Defines a unary functor, which associates arguments to results.