DGtal  1.1.0
VCMDigitalSurfaceLocalEstimator.h
1 
17 #pragma once
18 
31 #if defined(VCMDigitalSurfaceLocalEstimator_RECURSES)
32 #error Recursive header files inclusion detected in VCMDigitalSurfaceLocalEstimator.h
33 #else // defined(VCMDigitalSurfaceLocalEstimator_RECURSES)
34 
35 #define VCMDigitalSurfaceLocalEstimator_RECURSES
36 
37 #if !defined VCMDigitalSurfaceLocalEstimator_h
38 
39 #define VCMDigitalSurfaceLocalEstimator_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/geometry/surfaces/estimation/VoronoiCovarianceMeasureOnDigitalSurface.h"
46 #include "DGtal/geometry/surfaces/estimation/VCMGeometricFunctors.h"
48 
49 namespace DGtal
50 {
51 
53  // template class VCMDigitalSurfaceLocalEstimator
80  template <typename TDigitalSurfaceContainer, typename TSeparableMetric,
81  typename TKernelFunction, typename TVCMGeometricFunctor>
83  {
86 
87  // ----------------------- public types ------------------------------
88  public:
90  typedef TDigitalSurfaceContainer DigitalSurfaceContainer;
91  typedef TSeparableMetric Metric;
92  typedef TKernelFunction KernelFunction;
93  typedef TVCMGeometricFunctor VCMGeometricFunctor;
97  typedef typename VCMOnSurface::Surface Surface;
98 
99  // ----------------------- model of CDigitalSurfaceLocalEstimator ----------------
100  typedef typename Surface::Surfel Surfel;
101  typedef typename VCMGeometricFunctor::Quantity Quantity;
102  // ----------------------- other types -----------------------
103  typedef typename Surface::SCell SCell;
105  typedef typename VCMOnSurface::Scalar Scalar;
106 
107  // ----------------------- Standard services ------------------------------
108  public:
109 
114 
119 
125 
131  Self& operator= ( const Self& other );
132 
141 
150 
159  void attach( ConstAlias<Surface> surface );
160 
186  void setParams( Surfel2PointEmbedding surfelEmbedding,
187  const Scalar R, const Scalar r, KernelFunction chi_r,
188  const Scalar t = 2.5, Metric aMetric = Metric(), bool verbose = true );
189 
201  template <typename SurfelConstIterator>
202  void init( const Scalar _h,
203  SurfelConstIterator itb,
204  SurfelConstIterator ite );
205 
211  template <typename SurfelConstIterator>
212  Quantity eval( SurfelConstIterator it ) const;
213 
221  template <typename SurfelConstIterator,typename OutputIterator>
222  OutputIterator eval( SurfelConstIterator itb,
223  SurfelConstIterator ite,
224  OutputIterator result ) const;
225 
230  Scalar h() const;
231 
232  // ----------------------- Interface --------------------------------------
233  public:
234 
239  void selfDisplay ( std::ostream & out ) const;
240 
245  bool isValid() const;
246 
247  // ------------------------- Protected Datas ------------------------------
248  protected:
259 
260  // ------------------------- Private Datas --------------------------------
261  private:
262 
263  // ------------------------- Hidden services ------------------------------
264  protected:
265 
266  private:
267 
268  // ------------------------- Internals ------------------------------------
269  private:
270 
271  }; // end of class VCMDigitalSurfaceLocalEstimator
272 
273 
280  template <typename TDigitalSurfaceContainer, typename TSeparableMetric,
281  typename TKernelFunction, typename TVCMGeometricFunctor>
282  std::ostream&
283  operator<< ( std::ostream & out,
284  const VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric,
285  TKernelFunction, TVCMGeometricFunctor > & object );
286 
287 } // namespace DGtal
288 
289 
291 // Includes inline functions.
292 #include "DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.ih"
293 
294 // //
296 
297 #endif // !defined VCMDigitalSurfaceLocalEstimator_h
298 
299 #undef VCMDigitalSurfaceLocalEstimator_RECURSES
300 #endif // else defined(VCMDigitalSurfaceLocalEstimator_RECURSES)
DGtal::VCMDigitalSurfaceLocalEstimator::eval
Quantity eval(SurfelConstIterator it) const
DGtal::DigitalSurface::ConstIterator
DigitalSurfaceContainer::SurfelConstIterator ConstIterator
Definition: DigitalSurface.h:163
DGtal::ConstAlias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition: ConstAlias.h:187
DGtal::VCMDigitalSurfaceLocalEstimator::eval
OutputIterator eval(SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator result) const
DGtal::VoronoiCovarianceMeasureOnDigitalSurface::Scalar
VCM::Scalar Scalar
the "real number" type
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:102
DGtal::DigitalSurface
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
Definition: DigitalSurface.h:140
DGtal::VoronoiCovarianceMeasureOnDigitalSurface
Aim: This class specializes the Voronoi covariance measure for digital surfaces. It adds notably the ...
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:87
DGtal::VCMDigitalSurfaceLocalEstimator::myVCMOnSurface
CountedConstPtrOrConstPtr< VCMOnSurface > myVCMOnSurface
A (possibly) shared object storing the whole Voronoi covariance measure.
Definition: VCMDigitalSurfaceLocalEstimator.h:254
DGtal::VCMDigitalSurfaceLocalEstimator::h
Scalar h() const
DGtal::VCMDigitalSurfaceLocalEstimator::VCMGeometricFunctor
TVCMGeometricFunctor VCMGeometricFunctor
Definition: VCMDigitalSurfaceLocalEstimator.h:93
DGtal::VCMDigitalSurfaceLocalEstimator::VCMDigitalSurfaceLocalEstimator
VCMDigitalSurfaceLocalEstimator(ConstAlias< VCMOnSurface > aVCMOnSurface)
DGtal::VCMDigitalSurfaceLocalEstimator::operator=
Self & operator=(const Self &other)
DGtal::Surfel2PointEmbedding
Surfel2PointEmbedding
Possible embeddings for surfel as point(s)
Definition: VoronoiCovarianceMeasureOnDigitalSurface.h:58
DGtal::VCMDigitalSurfaceLocalEstimator::ConstIterator
Surface::ConstIterator ConstIterator
the iterator on surfels
Definition: VCMDigitalSurfaceLocalEstimator.h:104
DGtal::VCMDigitalSurfaceLocalEstimator::VCMDigitalSurfaceLocalEstimator
VCMDigitalSurfaceLocalEstimator()
DGtal::VCMDigitalSurfaceLocalEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CDigitalSurfaceContainer< TDigitalSurfaceContainer >))
DGtal::concepts::CDigitalSurfaceContainer
Aim: The digital surface container concept describes a minimal set of inner types and methods so as t...
Definition: CDigitalSurfaceContainer.h:128
DGtal::VCMDigitalSurfaceLocalEstimator::Self
VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor > Self
my own type
Definition: VCMDigitalSurfaceLocalEstimator.h:89
DGtal::VCMDigitalSurfaceLocalEstimator::attach
void attach(ConstAlias< Surface > surface)
DGtal::VCMDigitalSurfaceLocalEstimator::myH
Scalar myH
The gridstep.
Definition: VCMDigitalSurfaceLocalEstimator.h:258
DGtal::VCMDigitalSurfaceLocalEstimator::isValid
bool isValid() const
DGtal::CountedConstPtrOrConstPtr
Aim: Smart or simple const pointer on T. It can be a smart pointer based on reference counts or a sim...
Definition: CountedConstPtrOrConstPtr.h:95
DGtal::VCMDigitalSurfaceLocalEstimator::DigitalSurfaceContainer
TDigitalSurfaceContainer DigitalSurfaceContainer
the chosen container
Definition: VCMDigitalSurfaceLocalEstimator.h:90
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::VCMDigitalSurfaceLocalEstimator::setParams
void setParams(Surfel2PointEmbedding surfelEmbedding, const Scalar R, const Scalar r, KernelFunction chi_r, const Scalar t=2.5, Metric aMetric=Metric(), bool verbose=true)
DGtal::VCMDigitalSurfaceLocalEstimator::KernelFunction
TKernelFunction KernelFunction
the kernel function
Definition: VCMDigitalSurfaceLocalEstimator.h:92
DGtal::VCMDigitalSurfaceLocalEstimator::VCMOnSurface
VoronoiCovarianceMeasureOnDigitalSurface< DigitalSurfaceContainer, Metric, KernelFunction > VCMOnSurface
the type of computing the Voronoi covariance measure on a digital surface.
Definition: VCMDigitalSurfaceLocalEstimator.h:96
DGtal::VCMDigitalSurfaceLocalEstimator::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSeparableMetric< TSeparableMetric >))
DGtal::DigitalSurface::SCell
DigitalSurfaceContainer::SCell SCell
Definition: DigitalSurface.h:161
DGtal::VCMDigitalSurfaceLocalEstimator::SCell
Surface::SCell SCell
the signed cell
Definition: VCMDigitalSurfaceLocalEstimator.h:103
DGtal::VCMDigitalSurfaceLocalEstimator::VCMDigitalSurfaceLocalEstimator
VCMDigitalSurfaceLocalEstimator(ConstAlias< Surface > surface)
DGtal::VCMDigitalSurfaceLocalEstimator::mySurfelEmbedding
Surfel2PointEmbedding mySurfelEmbedding
the embedding chosen for the surfels.
Definition: VCMDigitalSurfaceLocalEstimator.h:252
DGtal::VCMDigitalSurfaceLocalEstimator::Quantity
VCMGeometricFunctor::Quantity Quantity
the estimation type is given by the geometric functor
Definition: VCMDigitalSurfaceLocalEstimator.h:101
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::VCMDigitalSurfaceLocalEstimator::mySurface
CountedConstPtrOrConstPtr< Surface > mySurface
A (possibly) shared object storing the digital surface.
Definition: VCMDigitalSurfaceLocalEstimator.h:250
DGtal::VCMDigitalSurfaceLocalEstimator::~VCMDigitalSurfaceLocalEstimator
~VCMDigitalSurfaceLocalEstimator()
DGtal::VCMDigitalSurfaceLocalEstimator::init
void init(const Scalar _h, SurfelConstIterator itb, SurfelConstIterator ite)
DGtal::VCMDigitalSurfaceLocalEstimator::VCMDigitalSurfaceLocalEstimator
VCMDigitalSurfaceLocalEstimator(const Self &other)
DGtal::DigitalSurface::Surfel
DigitalSurfaceContainer::Surfel Surfel
Definition: DigitalSurface.h:162
DGtal::VCMDigitalSurfaceLocalEstimator::myGeomFct
VCMGeometricFunctor myGeomFct
The geometric functor.
Definition: VCMDigitalSurfaceLocalEstimator.h:256
DGtal::VCMDigitalSurfaceLocalEstimator::Scalar
VCMOnSurface::Scalar Scalar
the "real number" type
Definition: VCMDigitalSurfaceLocalEstimator.h:105
DGtal::VCMDigitalSurfaceLocalEstimator
Aim: This class adapts a VoronoiCovarianceMeasureOnDigitalSurface to be a model of CDigitalSurfaceLoc...
Definition: VCMDigitalSurfaceLocalEstimator.h:83
DGtal::VCMDigitalSurfaceLocalEstimator::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::concepts::CSeparableMetric
Aim: defines the concept of separable metrics.
Definition: CSeparableMetric.h:102
DGtal::VCMDigitalSurfaceLocalEstimator::Metric
TSeparableMetric Metric
the chosen metric
Definition: VCMDigitalSurfaceLocalEstimator.h:91
DGtal::VCMDigitalSurfaceLocalEstimator::Surface
VCMOnSurface::Surface Surface
the digital surface
Definition: VCMDigitalSurfaceLocalEstimator.h:97
DGtal::VCMDigitalSurfaceLocalEstimator::Surfel
Surface::Surfel Surfel
the signed surface element
Definition: VCMDigitalSurfaceLocalEstimator.h:100