DGtal 1.4.0
|
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 | |
typedef TDigitalSurfaceContainer | DigitalSurfaceContainer |
the chosen container | |
typedef TSeparableMetric | Metric |
the chosen metric | |
typedef TKernelFunction | KernelFunction |
the kernel function | |
typedef TVCMGeometricFunctor | VCMGeometricFunctor |
typedef VoronoiCovarianceMeasureOnDigitalSurface< DigitalSurfaceContainer, Metric, KernelFunction > | VCMOnSurface |
the type of computing the Voronoi covariance measure on a digital surface. | |
typedef VCMOnSurface::Surface | Surface |
the digital surface | |
typedef Surface::Surfel | Surfel |
the signed surface element | |
typedef VCMGeometricFunctor::Quantity | Quantity |
the estimation type is given by the geometric functor | |
typedef Surface::SCell | SCell |
the signed cell | |
typedef Surface::ConstIterator | ConstIterator |
the iterator on surfels | |
typedef VCMOnSurface::Scalar | Scalar |
the "real number" type | |
Public Member Functions | |
~VCMDigitalSurfaceLocalEstimator () | |
VCMDigitalSurfaceLocalEstimator () | |
VCMDigitalSurfaceLocalEstimator (const Self &other) | |
Self & | operator= (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< Surface > | mySurface |
A (possibly) shared object storing the digital surface. | |
Surfel2PointEmbedding | mySurfelEmbedding |
the embedding chosen for the surfels. | |
CountedConstPtrOrConstPtr< VCMOnSurface > | myVCMOnSurface |
A (possibly) shared object storing the whole Voronoi covariance measure. | |
VCMGeometricFunctor | myGeomFct |
The geometric functor. | |
Scalar | myH |
The gridstep. | |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CDigitalSurfaceContainer< TDigitalSurfaceContainer >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CSeparableMetric< TSeparableMetric >)) | |
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'
TDigitalSurfaceContainer | the type of digital surface container (model of CDigitalSurfaceContainer). |
TSeparableMetric | a model of CSeparableMetric used for computing the Voronoi map (e.g. Euclidean metric is DGtal::ExactPredicateLpSeparableMetric<TSpace, 2> ) |
TKernelFunction | the type of the kernel function chi_r used for integrating the VCM, a map: Point -> Scalar. |
TVCMGeometricFunctor | the 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.
typedef Surface::ConstIterator DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::ConstIterator |
the iterator on surfels
Definition at line 104 of file VCMDigitalSurfaceLocalEstimator.h.
typedef TDigitalSurfaceContainer DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::DigitalSurfaceContainer |
the chosen container
Definition at line 90 of file VCMDigitalSurfaceLocalEstimator.h.
typedef TKernelFunction DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::KernelFunction |
the kernel function
Definition at line 92 of file VCMDigitalSurfaceLocalEstimator.h.
typedef TSeparableMetric DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Metric |
the chosen metric
Definition at line 91 of file VCMDigitalSurfaceLocalEstimator.h.
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.
typedef VCMOnSurface::Scalar DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Scalar |
the "real number" type
Definition at line 105 of file VCMDigitalSurfaceLocalEstimator.h.
typedef Surface::SCell DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::SCell |
the signed cell
Definition at line 103 of file VCMDigitalSurfaceLocalEstimator.h.
typedef VCMDigitalSurfaceLocalEstimator<TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor> DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Self |
my own type
Definition at line 89 of file VCMDigitalSurfaceLocalEstimator.h.
typedef VCMOnSurface::Surface DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Surface |
the digital surface
Definition at line 97 of file VCMDigitalSurfaceLocalEstimator.h.
typedef Surface::Surfel DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::Surfel |
the signed surface element
Definition at line 100 of file VCMDigitalSurfaceLocalEstimator.h.
typedef TVCMGeometricFunctor DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMGeometricFunctor |
the geometric functor (normal, principal directions)
Definition at line 93 of file VCMDigitalSurfaceLocalEstimator.h.
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.
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::~VCMDigitalSurfaceLocalEstimator | ( | ) |
Destructor.
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator | ( | ) |
Default constructor.
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator | ( | const Self & | other | ) |
Copy constructor.
other | the object to clone. |
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator | ( | ConstAlias< Surface > | surface | ) |
Constructor. The estimator is invalid and setParams must be called.
surface | the digital surface that is aliased in this. The user can secure the aliasing by passing a CountedConstPtrOrConstPtr. |
DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::VCMDigitalSurfaceLocalEstimator | ( | ConstAlias< VCMOnSurface > | aVCMOnSurface | ) |
Constructor from VoronoiCovarianceMeasureOnDigitalSurface. The estimator is immediately valid.
aVCMOnSurface | any valid Voronoi covariance measure, which is aliased (possibly securely). |
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.
surface | the digital surface that is aliased in this. The user can secure the aliasing by passing a CountedConstPtrOrConstPtr. |
|
private |
|
private |
Quantity DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::eval | ( | SurfelConstIterator | it | ) | const |
SurfelConstIterator | any model of forward readable iterator on Surfel. |
[in] | it | the surfel iterator at which we evaluate the quantity (within the range given at init). |
OutputIterator DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::eval | ( | SurfelConstIterator | itb, |
SurfelConstIterator | ite, | ||
OutputIterator | result ) const |
Scalar DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::h | ( | ) | const |
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.
SurfelConstIterator | any model of forward readable iterator on Surfel. |
[in] | _h | grid size (must be >0). |
[in] | ite | iterator on the first surfel of the surface. |
[in] | itb | iterator after the last surfel of the surface. |
bool DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Self & DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::operator= | ( | const Self & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::VCMDigitalSurfaceLocalEstimator< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction, TVCMGeometricFunctor >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
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.
[in] | surfelEmbedding | the chosen embedding for surfels. |
[in] | R | the 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_r | the kernel function whose support has radius less or equal to r. |
[in] | t | the radius for the trivial normal estimator, which is used for finding the correct orientation inside/outside for the VCM. |
[in] | aMetric | an instance of the metric. |
[in] | verbose | if 'true' displays information on ongoing computation. |
|
protected |
The geometric functor.
Definition at line 256 of file VCMDigitalSurfaceLocalEstimator.h.
|
protected |
The gridstep.
Definition at line 258 of file VCMDigitalSurfaceLocalEstimator.h.
|
protected |
A (possibly) shared object storing the digital surface.
Definition at line 250 of file VCMDigitalSurfaceLocalEstimator.h.
|
protected |
the embedding chosen for the surfels.
Definition at line 252 of file VCMDigitalSurfaceLocalEstimator.h.
|
protected |
A (possibly) shared object storing the whole Voronoi covariance measure.
Definition at line 254 of file VCMDigitalSurfaceLocalEstimator.h.