DGtal  1.5.beta
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor > Class Template Reference

Aim: This class adapts a VoronoiCovarianceMeasureOnDigitalSurface to be a model of CDigitalSurfaceLocalEstimator. It uses the Voronoi Covariance Measure to estimate geometric quantities. The type TVCMGeometricFunctor specifies which is the estimated quantity. For instance, VCMGeometricFunctors::VCMNormalVectorFunctor returns the estimated VCM surface outward normal for given surfels. More...

#include <DGtal/geometry/surfaces/estimation/VCMDigitalSurfaceLocalEstimator.h>

Public Types

typedef VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor > Self
 my own type More...
 
typedef TDigitalSurfaceContainer DigitalSurfaceContainer
 the chosen container More...
 
typedef TSeparableMetric Metric
 the chosen metric More...
 
typedef TKernelFunction KernelFunction
 the kernel function More...
 
typedef TVCMGeometricFunctor VCMGeometricFunctor
 
typedef VoronoiCovarianceMeasureOnDigitalSurface< DigitalSurfaceContainer, Metric, KernelFunctionVCMOnSurface
 the type of computing the Voronoi covariance measure on a digital surface. More...
 
typedef VCMOnSurface::Surface Surface
 the digital surface More...
 
typedef Surface::Surfel Surfel
 the signed surface element More...
 
typedef VCMGeometricFunctor::Quantity Quantity
 the estimation type is given by the geometric functor More...
 
typedef Surface::SCell SCell
 the signed cell More...
 
typedef Surface::ConstIterator ConstIterator
 the iterator on surfels More...
 
typedef VCMOnSurface::Scalar Scalar
 the "real number" type More...
 

Public Member Functions

 ~VCMDigitalSurfaceLocalEstimator ()
 
 VCMDigitalSurfaceLocalEstimator ()
 
 VCMDigitalSurfaceLocalEstimator (const Self &other)
 
Selfoperator= (const Self &other)
 
 VCMDigitalSurfaceLocalEstimator (ConstAlias< Surface > surface)
 
 VCMDigitalSurfaceLocalEstimator (ConstAlias< VCMOnSurface > aVCMOnSurface)
 
void attach (ConstAlias< Surface > surface)
 
void setParams (Surfel2PointEmbedding surfelEmbedding, const Scalar R, const Scalar r, KernelFunction chi_r, const Scalar t=2.5, Metric aMetric=Metric(), bool verbose=true)
 
template<typename SurfelConstIterator >
void init (const Scalar _h, SurfelConstIterator itb, SurfelConstIterator ite)
 
template<typename SurfelConstIterator >
Quantity eval (SurfelConstIterator it) const
 
template<typename SurfelConstIterator , typename OutputIterator >
OutputIterator eval (SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator result) const
 
Scalar h () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Attributes

CountedConstPtrOrConstPtr< SurfacemySurface
 A (possibly) shared object storing the digital surface. More...
 
Surfel2PointEmbedding mySurfelEmbedding
 the embedding chosen for the surfels. More...
 
CountedConstPtrOrConstPtr< VCMOnSurfacemyVCMOnSurface
 A (possibly) shared object storing the whole Voronoi covariance measure. More...
 
VCMGeometricFunctor myGeomFct
 The geometric functor. More...
 
Scalar myH
 The gridstep. More...
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSurfaceContainer< TDigitalSurfaceContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CSeparableMetric< TSeparableMetric >))
 

Detailed Description

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction, typename TVCMGeometricFunctor>
class DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >

Aim: This class adapts a VoronoiCovarianceMeasureOnDigitalSurface to be a model of CDigitalSurfaceLocalEstimator. It uses the Voronoi Covariance Measure to estimate geometric quantities. The type TVCMGeometricFunctor specifies which is the estimated quantity. For instance, VCMGeometricFunctors::VCMNormalVectorFunctor returns the estimated VCM surface outward normal for given surfels.

Description of template class 'VCMDigitalSurfaceLocalEstimator'

Note
Documentation in The class VCMDigitalSurfaceLocalEstimator.
Template Parameters
TDigitalSurfaceContainerthe type of digital surface container (model of CDigitalSurfaceContainer).
TSeparableMetrica model of CSeparableMetric used for computing the Voronoi map (e.g. Euclidean metric is DGtal::ExactPredicateLpSeparableMetric<TSpace, 2> )
TKernelFunctionthe type of the kernel function chi_r used for integrating the VCM, a map: Point -> Scalar.
TVCMGeometricFunctorthe type of the functor Surfel -> Quantity which chooses what is the returned estimation. Any VCMGeometricFunctors::VCMNormalVectorFunctor, ... is ok.

Definition at line 82 of file VCMDigitalSurfaceLocalEstimator.h.

Member Typedef Documentation

◆ ConstIterator

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef Surface::ConstIterator DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::ConstIterator

the iterator on surfels

Definition at line 104 of file VCMDigitalSurfaceLocalEstimator.h.

◆ DigitalSurfaceContainer

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef TDigitalSurfaceContainer DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::DigitalSurfaceContainer

the chosen container

Definition at line 90 of file VCMDigitalSurfaceLocalEstimator.h.

◆ KernelFunction

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef TKernelFunction DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::KernelFunction

the kernel function

Definition at line 92 of file VCMDigitalSurfaceLocalEstimator.h.

◆ Metric

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef TSeparableMetric DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Metric

the chosen metric

Definition at line 91 of file VCMDigitalSurfaceLocalEstimator.h.

◆ Quantity

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef VCMGeometricFunctor::Quantity DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Quantity

the estimation type is given by the geometric functor

Definition at line 101 of file VCMDigitalSurfaceLocalEstimator.h.

◆ Scalar

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef VCMOnSurface::Scalar DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Scalar

the "real number" type

Definition at line 105 of file VCMDigitalSurfaceLocalEstimator.h.

◆ SCell

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef Surface::SCell DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::SCell

the signed cell

Definition at line 103 of file VCMDigitalSurfaceLocalEstimator.h.

◆ Self

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef VCMDigitalSurfaceLocalEstimator<TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor> DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Self

my own type

Definition at line 89 of file VCMDigitalSurfaceLocalEstimator.h.

◆ Surface

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef VCMOnSurface::Surface DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Surface

the digital surface

Definition at line 97 of file VCMDigitalSurfaceLocalEstimator.h.

◆ Surfel

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef Surface::Surfel DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Surfel

the signed surface element

Definition at line 100 of file VCMDigitalSurfaceLocalEstimator.h.

◆ VCMGeometricFunctor

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef TVCMGeometricFunctor DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMGeometricFunctor

the geometric functor (normal, principal directions)

Definition at line 93 of file VCMDigitalSurfaceLocalEstimator.h.

◆ VCMOnSurface

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
typedef VoronoiCovarianceMeasureOnDigitalSurface<DigitalSurfaceContainer, Metric, KernelFunction> DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMOnSurface

the type of computing the Voronoi covariance measure on a digital surface.

Definition at line 96 of file VCMDigitalSurfaceLocalEstimator.h.

Constructor & Destructor Documentation

◆ ~VCMDigitalSurfaceLocalEstimator()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::~VCMDigitalSurfaceLocalEstimator ( )

Destructor.

◆ VCMDigitalSurfaceLocalEstimator() [1/4]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator ( )

Default constructor.

◆ VCMDigitalSurfaceLocalEstimator() [2/4]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator ( const Self other)

Copy constructor.

Parameters
otherthe object to clone.

◆ VCMDigitalSurfaceLocalEstimator() [3/4]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator ( ConstAlias< Surface surface)

Constructor. The estimator is invalid and setParams must be called.

Parameters
surfacethe digital surface that is aliased in this. The user can secure the aliasing by passing a CountedConstPtrOrConstPtr.

◆ VCMDigitalSurfaceLocalEstimator() [4/4]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator ( ConstAlias< VCMOnSurface aVCMOnSurface)

Constructor from VoronoiCovarianceMeasureOnDigitalSurface. The estimator is immediately valid.

Parameters
aVCMOnSurfaceany valid Voronoi covariance measure, which is aliased (possibly securely).

Member Function Documentation

◆ attach()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
void DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::attach ( ConstAlias< Surface surface)

Attach a digital surface. After this call, the object is then invalid and the user must called setParams.

Parameters
surfacethe digital surface that is aliased in this. The user can secure the aliasing by passing a CountedConstPtrOrConstPtr.

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSurfaceContainer< TDigitalSurfaceContainer >)  )
private

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::BOOST_CONCEPT_ASSERT ( (concepts::CSeparableMetric< TSeparableMetric >)  )
private

◆ eval() [1/2]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
template<typename SurfelConstIterator >
Quantity DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::eval ( SurfelConstIterator  it) const
Template Parameters
SurfelConstIteratorany model of forward readable iterator on Surfel.
Parameters
[in]itthe surfel iterator at which we evaluate the quantity (within the range given at init).
Returns
the estimated quantity at *it

◆ eval() [2/2]

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
template<typename SurfelConstIterator , typename OutputIterator >
OutputIterator DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::eval ( SurfelConstIterator  itb,
SurfelConstIterator  ite,
OutputIterator  result 
) const
Returns
the estimated quantity in the range [itb,ite)
Parameters
[in]itbstarting surfel iterator (within the range given at init).
[in]iteend surfel iterator (within the range given at init).
[in,out]resultresulting output iterator

◆ h()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
Scalar DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::h ( ) const
Returns
the gridstep.
Precondition
must be called after init

◆ init()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
template<typename SurfelConstIterator >
void DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::init ( const Scalar  _h,
SurfelConstIterator  itb,
SurfelConstIterator  ite 
)

Model of CDigitalSurfaceLocalEstimator. Initialisation. Only used for storing gridstep and checking object validity. The VCM is necessarily initialized on the whole surface and _h is not used for normal estimation.

Template Parameters
SurfelConstIteratorany model of forward readable iterator on Surfel.
Parameters
[in]_hgrid size (must be >0).
[in]iteiterator on the first surfel of the surface.
[in]itbiterator after the last surfel of the surface.

◆ isValid()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
bool DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ operator=()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
Self& DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::operator= ( const Self other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ selfDisplay()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
void DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ setParams()

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
void DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::setParams ( Surfel2PointEmbedding  surfelEmbedding,
const Scalar  R,
const Scalar  r,
KernelFunction  chi_r,
const Scalar  t = 2.5,
Metric  aMetric = Metric(),
bool  verbose = true 
)

Initialisation of estimator specific parameters.

Parameters
[in]surfelEmbeddingthe chosen embedding for surfels.
[in]Rthe offset radius for the set of points. Voronoi cells are intersected with this offset. The unit corresponds to a step in the digital space.
[in]r(an upper bound of) the radius of the support of the kernel function chi_r (note \(\chi_r\) in the VCM paper). The unit corresponds to a step in the digital space. This parameter is used for preparing the data structure that answers to proximity queries.
[in]chi_rthe kernel function whose support has radius less or equal to r.
[in]tthe radius for the trivial normal estimator, which is used for finding the correct orientation inside/outside for the VCM.
[in]aMetrican instance of the metric.
[in]verboseif 'true' displays information on ongoing computation.

Field Documentation

◆ myGeomFct

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
VCMGeometricFunctor DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::myGeomFct
protected

The geometric functor.

Definition at line 256 of file VCMDigitalSurfaceLocalEstimator.h.

◆ myH

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
Scalar DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::myH
protected

The gridstep.

Definition at line 258 of file VCMDigitalSurfaceLocalEstimator.h.

◆ mySurface

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
CountedConstPtrOrConstPtr<Surface> DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::mySurface
protected

A (possibly) shared object storing the digital surface.

Definition at line 250 of file VCMDigitalSurfaceLocalEstimator.h.

◆ mySurfelEmbedding

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
Surfel2PointEmbedding DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::mySurfelEmbedding
protected

the embedding chosen for the surfels.

Definition at line 252 of file VCMDigitalSurfaceLocalEstimator.h.

◆ myVCMOnSurface

template<typename TDigitalSurfaceContainer , typename TSeparableMetric , typename TKernelFunction , typename TVCMGeometricFunctor >
CountedConstPtrOrConstPtr<VCMOnSurface> DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::myVCMOnSurface
protected

A (possibly) shared object storing the whole Voronoi covariance measure.

Definition at line 254 of file VCMDigitalSurfaceLocalEstimator.h.


The documentation for this class was generated from the following file: