DGtal  0.9.4beta
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction > Class Template Reference

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

Collaboration diagram for DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >:
[legend]

Data Structures

struct  EigenStructure
 
struct  Normals
 

Public Types

typedef TDigitalSurfaceContainer DigitalSurfaceContainer
 
typedef TSeparableMetric Metric
 
typedef TKernelFunction KernelFunction
 
typedef DigitalSurface< DigitalSurfaceContainerSurface
 
typedef DigitalSurfaceContainer::KSpace KSpace
 
typedef DigitalSurfaceContainer::Surfel Surfel
 
typedef KSpace::SCell SCell
 
typedef KSpace::Space Space
 
typedef KSpace::Point Point
 
typedef VoronoiCovarianceMeasure< Space, MetricVCM
 
typedef VCM::Scalar Scalar
 
typedef Surface::ConstIterator ConstIterator
 
typedef EigenDecomposition< KSpace::dimension, ScalarLinearAlgebraTool
 
typedef VCM::VectorN VectorN
 
typedef VCM::MatrixNN MatrixNN
 
typedef std::map< Point, EigenStructurePoint2EigenStructure
 
typedef std::map< Surfel, NormalsSurfel2Normals
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< KernelFunction, Point, Scalar >))
 
 ~VoronoiCovarianceMeasureOnDigitalSurface ()
 
 VoronoiCovarianceMeasureOnDigitalSurface (ConstAlias< Surface > _surface, Surfel2PointEmbedding _surfelEmbedding, Scalar _R, Scalar _r, KernelFunction chi_r, Scalar t=2.5, Metric aMetric=Metric(), bool verbose=false)
 
CountedConstPtrOrConstPtr< Surfacesurface () const
 
Surfel2PointEmbedding surfelEmbedding () const
 
Scalar R () const
 
Scalar r () const
 
Scalar radiusTrivial () const
 
template<typename PointOutputIterator >
PointOutputIterator getPoints (PointOutputIterator outIt, Surfel s) const
 
const Surfel2NormalsmapSurfel2Normals () const
 
const Point2EigenStructuremapPoint2ChiVCM () const
 
bool getChiVCMEigenvalues (VectorN &values, Surfel s) const
 
bool getChiVCMEigenStructure (VectorN &values, MatrixNN &vectors, Surfel s) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Member Functions

 VoronoiCovarianceMeasureOnDigitalSurface ()
 

Protected Attributes

CountedConstPtrOrConstPtr< SurfacemySurface
 
Surfel2PointEmbedding mySurfelEmbedding
 
KernelFunction myChi
 
VCM myVCM
 
Scalar myRadiusTrivial
 
Point2EigenStructure myPt2EigenStructure
 
Surfel2Normals mySurfel2Normals
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSurfaceContainer< TDigitalSurfaceContainer >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CSeparableMetric< TSeparableMetric >))
 
 VoronoiCovarianceMeasureOnDigitalSurface (const VoronoiCovarianceMeasureOnDigitalSurface &other)
 
VoronoiCovarianceMeasureOnDigitalSurfaceoperator= (const VoronoiCovarianceMeasureOnDigitalSurface &other)
 

Detailed Description

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
class DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >

Aim: This class specializes the Voronoi covariance measure for digital surfaces. It adds notably the embedding of surface elements, the diagonalisation of the VCM, and the orientation of the first VCM eigenvector toward the interior of the surface.

Description of template class 'VoronoiCovarianceMeasureOnDigitalSurface'

Note
Documentation in The class VoronoiCovarianceMeasureOnDigitalSurface.
See also
VoronoiCovarianceMeasure
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.
Examples:
geometry/surfaces/dvcm-2d-curvature.cpp, and geometry/surfaces/dvcm-3d.cpp.

Definition at line 86 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

Member Typedef Documentation

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

the iterator for traversing the surface

Definition at line 103 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

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

the chosen container

Definition at line 92 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

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

the kernel function

Definition at line 94 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef DigitalSurfaceContainer::KSpace DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::KSpace

the cellular space

Definition at line 96 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef EigenDecomposition<KSpace::dimension,Scalar> DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::LinearAlgebraTool

diagonalizer (nD).

Definition at line 104 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef VCM::MatrixNN DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::MatrixNN

nxn R-matrix

Definition at line 106 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

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

the chosen metric

Definition at line 93 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef KSpace::Point DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Point

the digital points

Definition at line 100 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef std::map<Point,EigenStructure> DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Point2EigenStructure

the map Point -> EigenStructure

Definition at line 120 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef VCM::Scalar DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Scalar

the "real number" type

Definition at line 102 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef KSpace::SCell DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::SCell

the signed cells

Definition at line 98 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef KSpace::Space DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Space

the digital space

Definition at line 99 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef DigitalSurface<DigitalSurfaceContainer> DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Surface

the chosen digital surface

Definition at line 95 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef DigitalSurfaceContainer::Surfel DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Surfel

the n-1 cells

Definition at line 97 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef std::map<Surfel,Normals> DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::Surfel2Normals

the map Surfel -> Normals

Definition at line 121 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef VoronoiCovarianceMeasure<Space,Metric> DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::VCM

the Voronoi Covariance Measure

Definition at line 101 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
typedef VCM::VectorN DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::VectorN

n-dimensional R-vector

Definition at line 105 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

Constructor & Destructor Documentation

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

Destructor.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::VoronoiCovarianceMeasureOnDigitalSurface ( ConstAlias< Surface _surface,
Surfel2PointEmbedding  _surfelEmbedding,
Scalar  _R,
Scalar  _r,
KernelFunction  chi_r,
Scalar  t = 2.5,
Metric  aMetric = Metric(),
bool  verbose = false 
)

Constructor. Computes the VCM of the given surface.

Parameters
_surfacethe digital surface that is aliased in this. The user can secure the aliasing by passing a CountedConstPtrOrConstPtr.
_surfelEmbeddingthe chosen embedding for surfels.
_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.
_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.
chi_rthe kernel function whose support has radius less or equal to r.
tthe radius for the trivial normal estimator, which is used for finding the correct orientation inside/outside for the VCM.
aMetrican instance of the metric.
verboseif 'true' displays information on ongoing computation.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::VoronoiCovarianceMeasureOnDigitalSurface ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::VoronoiCovarianceMeasureOnDigitalSurface ( const VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction > &  other)
private

Copy constructor.

Parameters
otherthe object to clone. Forbidden by default.

Member Function Documentation

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSurfaceContainer< TDigitalSurfaceContainer >)  )
private
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::BOOST_CONCEPT_ASSERT ( (concepts::CSeparableMetric< TSeparableMetric >)  )
private
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::BOOST_CONCEPT_ASSERT ( (concepts::CUnaryFunctor< KernelFunction, Point, Scalar >)  )
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
bool DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::getChiVCMEigenStructure ( VectorN values,
MatrixNN vectors,
Surfel  s 
) const

Gets the eigen decomposition of the chi_r VCM at surfel s.

Parameters
[out]valuesthe eigenvalues of the chi_r VCM at s sorted from lowest to highest..
[out]vectorsthe eigenvectors of the chi_r VCM at s associated to values.
[in]sthe surfel
Returns
'true' is the surfel s was valid.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
bool DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::getChiVCMEigenvalues ( VectorN values,
Surfel  s 
) const

Gets the eigenvalues of the chi_r VCM at surfel s sorted from lowest to highest.

Parameters
[out]valuesthe eigenvalues of the chi_r VCM at s.
[in]sthe surfel
Returns
'true' is the surfel s was valid.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
template<typename PointOutputIterator >
PointOutputIterator DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::getPoints ( PointOutputIterator  outIt,
Surfel  s 
) const
Parameters
[in]outItan output iterator on Point to write the point(s) associated to surfel s.
[in]sthe surfel that is embedded in the digital space according to mySurfelEmbedding.
Returns
the (modified) output iterator after the write operations.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
bool DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
const Point2EigenStructure& DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::mapPoint2ChiVCM ( ) const
Returns
a const-reference to the map Point -> EigenStructure of the chi_r VCM (eigenvalues and eigenvectors).
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
const Surfel2Normals& DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::mapSurfel2Normals ( ) const
Returns
a const-reference to the map Surfel -> Normals (vcm and trivial normal).
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
VoronoiCovarianceMeasureOnDigitalSurface& DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::operator= ( const VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Scalar DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::R ( ) const
Returns
the parameter R in the VCM, i.e. the offset radius for the compact set K.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Scalar DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::r ( ) const
Returns
the parameter r in VCM(chi_r), i.e. an upper bound for the diameter of the support of kernel functions.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Scalar DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::radiusTrivial ( ) const
Returns
the radius for the trivial normal estimator, which is used for finding the correct orientation inside/outside for the VCM.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
void DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
CountedConstPtrOrConstPtr< Surface > DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::surface ( ) const

the const-aliased digital surface.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Surfel2PointEmbedding DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::surfelEmbedding ( ) const

the chosen embedding Surfel -> Point(s)

Field Documentation

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
KernelFunction DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::myChi
protected

The kernel function chi_r.

Definition at line 239 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Point2EigenStructure DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::myPt2EigenStructure
protected

Stores for each point p its convolved VCM, i.e. VCM( chi_r( p ) )

Definition at line 247 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Scalar DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::myRadiusTrivial
protected

Stores the radius for the trivial normal estimator, which is used for finding the correct orientation inside/outside for the VCM.

Definition at line 245 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

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

(possibly secure) alias of the digital surface

Definition at line 235 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
Surfel2Normals DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::mySurfel2Normals
protected

Stores for each surfel its vcm normal and its trivial normal.

Definition at line 249 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

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

The chosen embedding for the surfels.

Definition at line 237 of file VoronoiCovarianceMeasureOnDigitalSurface.h.

template<typename TDigitalSurfaceContainer, typename TSeparableMetric, typename TKernelFunction>
VCM DGtal::VoronoiCovarianceMeasureOnDigitalSurface< TDigitalSurfaceContainer, TSeparableMetric, TKernelFunction >::myVCM
protected

Stores the voronoi covariance measure of the point embedding of the surface.

Definition at line 241 of file VoronoiCovarianceMeasureOnDigitalSurface.h.


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