DGtal 1.3.0
|
Aim: This class implement an Integral Invariant estimator which computes for each surfel the volume of the intersection of the shape with a ball of given radius centered on the surfel. More...
#include <DGtal/geometry/surfaces/estimation/IntegralInvariantVolumeEstimator.h>
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< KSpace >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< PointPredicate >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CCellFunctor< ShapeSpelFunctor >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< VolumeFunctor, Component, Quantity >)) | |
BOOST_STATIC_ASSERT ((concepts::ConceptUtils::SameType< typename Convolver::Quantity, typename VolumeFunctor::Argument >::value)) | |
IntegralInvariantVolumeEstimator (VolumeFunctor fct=VolumeFunctor()) | |
IntegralInvariantVolumeEstimator (ConstAlias< KSpace > K, ConstAlias< PointPredicate > aPointPredicate, VolumeFunctor fct=VolumeFunctor()) | |
~IntegralInvariantVolumeEstimator () | |
IntegralInvariantVolumeEstimator (const Self &other) | |
Self & | operator= (const Self &other) |
void | clear () |
Scalar | h () const |
void | attach (ConstAlias< KSpace > K, ConstAlias< PointPredicate > aPointPredicate) |
void | setParams (const double dRadius) |
template<typename SurfelConstIterator > | |
void | init (const double _h, SurfelConstIterator itb, SurfelConstIterator ite) |
template<typename SurfelConstIterator > | |
Quantity | eval (SurfelConstIterator it) const |
template<typename OutputIterator , typename SurfelConstIterator > | |
OutputIterator | eval (SurfelConstIterator itb, SurfelConstIterator ite, OutputIterator result) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Attributes | |
VolumeFunctor | myFct |
The volume functor that transforms the volume into a quantity. More... | |
const KernelSpelFunctor | myKernelFunctor |
Kernel functor (on Spel) More... | |
std::vector< PairIterators > | myKernels |
array of begin/end iterator of shifting masks. More... | |
std::vector< DigitalSet * > | myKernelsSet |
Array of shifting masks. Size = 9 for each shifting (0-adjacent and full kernel included) More... | |
CountedPtr< KernelSupport > | myKernel |
Euclidean kernel. More... | |
CountedPtr< DigitalShapeKernel > | myDigKernel |
Digital kernel. More... | |
CountedConstPtrOrConstPtr< PointPredicate > | myPointPredicate |
Smart pointer (if required) on a point predicate. More... | |
CountedPtr< Domain > | myShapeDomain |
Smart pointer on domain More... | |
CountedPtr< ShapePointFunctor > | myShapePointFunctor |
Smart pointer on functor point -> {0,1}. More... | |
CountedPtr< ShapeSpelFunctor > | myShapeSpelFunctor |
Smart pointer on functor spel -> {0,1}. More... | |
CountedPtr< Convolver > | myConvolver |
Convolver. More... | |
Scalar | myH |
precision of the grid More... | |
Scalar | myRadius |
"digital" radius of the kernel (buy may be non integer). More... | |
Aim: This class implement an Integral Invariant estimator which computes for each surfel the volume of the intersection of the shape with a ball of given radius centered on the surfel.
Description of template class 'IntegralInvariantVolumeEstimator'
The algorithm we propose uses a kernel (2D: Ball2D, 3D: Ball3D) that is moved along the surface. The volume of this kernel intersected with the shape carries local geometric information. It can be used to compute the mean curvature in 2D and 3D. Theorical multigrid convergence is proved, with a convergence speed of O(h^1/3) with hypothesis about the shape geometry and the convolution kernel radius. Experimental results confirm the multigrid convergence.
Optimization is available when we give a range of 0-adjacent surfels to the estimator. Note that you should use IntegralInvariantCovarianceEstimator instead when trying to estimate the normal or principal curvature directions, the Gaussian curvature or individual principal curvature values.
TKSpace | a model of CCellularGridSpaceND, the cellular space in which the shape is defined. |
TPointPredicate | a model of concepts::CPointPredicate, a predicate Point -> bool that defines a digital shape as a characteristic function. |
TVolumeFunctor | a model of functor Real -> Quantity, that defines how the volume computed by the Integral Invariant estimator is transformed into e.g. a curvature, etc. Models include IIGeometricFunctors::IICurvatureFunctor, IIGeometricFunctors::IIMeanCurvature3DFunctor. |
Definition at line 113 of file IntegralInvariantVolumeEstimator.h.
typedef Matrix::Component DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Component |
Definition at line 158 of file IntegralInvariantVolumeEstimator.h.
typedef SurfelSet::const_iterator DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::ConstIteratorKernel |
Definition at line 133 of file IntegralInvariantVolumeEstimator.h.
typedef DigitalSurfaceConvolver<ShapeSpelFunctor, KernelSpelFunctor, KSpace, DigitalShapeKernel> DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Convolver |
Definition at line 155 of file IntegralInvariantVolumeEstimator.h.
typedef DigitalSetSelector<Domain,BIG_DS+HIGH_VAR_DS>::Type DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::DigitalSet |
Definition at line 129 of file IntegralInvariantVolumeEstimator.h.
typedef GaussDigitizer< Space, EuclideanMinus > DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::DigitalShape |
Definition at line 152 of file IntegralInvariantVolumeEstimator.h.
typedef GaussDigitizer< Space, KernelSupport > DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::DigitalShapeKernel |
Definition at line 151 of file IntegralInvariantVolumeEstimator.h.
typedef HyperRectDomain<Space> DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Domain |
Definition at line 125 of file IntegralInvariantVolumeEstimator.h.
typedef EuclideanShapesCSG< KernelSupport, KernelSupport > DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::EuclideanMinus |
Definition at line 150 of file IntegralInvariantVolumeEstimator.h.
typedef functors::ConstValueCell<Value, Spel> DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::KernelSpelFunctor |
Definition at line 148 of file IntegralInvariantVolumeEstimator.h.
typedef ImplicitBall<Space> DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::KernelSupport |
Definition at line 149 of file IntegralInvariantVolumeEstimator.h.
typedef TKSpace DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::KSpace |
Definition at line 117 of file IntegralInvariantVolumeEstimator.h.
typedef Convolver::CovarianceMatrix DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Matrix |
Definition at line 157 of file IntegralInvariantVolumeEstimator.h.
typedef Convolver::PairIterators DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::PairIterators |
Definition at line 156 of file IntegralInvariantVolumeEstimator.h.
typedef Space::Point DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Point |
Definition at line 126 of file IntegralInvariantVolumeEstimator.h.
typedef TPointPredicate DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::PointPredicate |
Definition at line 118 of file IntegralInvariantVolumeEstimator.h.
typedef VolumeFunctor::Quantity DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Quantity |
The returned type of the estimator, depends on the functor.
Definition at line 136 of file IntegralInvariantVolumeEstimator.h.
typedef Space::RealPoint DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::RealPoint |
Definition at line 127 of file IntegralInvariantVolumeEstimator.h.
typedef Space::RealVector DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::RealVector |
Definition at line 128 of file IntegralInvariantVolumeEstimator.h.
typedef double DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Scalar |
Definition at line 159 of file IntegralInvariantVolumeEstimator.h.
typedef IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor> DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Self |
Definition at line 116 of file IntegralInvariantVolumeEstimator.h.
typedef functors::PointFunctorFromPointPredicateAndDomain< PointPredicate, Domain, unsigned int > DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::ShapePointFunctor |
A wrapper around point predicate (functor Point -> bool) that transforms it into a functor Point -> unsigned int (0 or 1).
Definition at line 142 of file IntegralInvariantVolumeEstimator.h.
typedef FunctorOnCells< ShapePointFunctor, KSpace > DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::ShapeSpelFunctor |
Adapts the a functor Point -> unsigned int (0 or 1) to a functor Cell -> unsigned int (0 ot 1), where Cell is a spel. Needed by DigitalSurfaceConvolver.
Definition at line 145 of file IntegralInvariantVolumeEstimator.h.
typedef KSpace::Space DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Space |
Definition at line 124 of file IntegralInvariantVolumeEstimator.h.
typedef KSpace::SCell DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Spel |
Definition at line 130 of file IntegralInvariantVolumeEstimator.h.
typedef KSpace::Surfel DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Surfel |
Definition at line 131 of file IntegralInvariantVolumeEstimator.h.
typedef KSpace::SurfelSet DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::SurfelSet |
Definition at line 132 of file IntegralInvariantVolumeEstimator.h.
typedef int DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::Value |
The type used for convolutions.
Definition at line 138 of file IntegralInvariantVolumeEstimator.h.
typedef TVolumeFunctor DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::VolumeFunctor |
Definition at line 119 of file IntegralInvariantVolumeEstimator.h.
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::IntegralInvariantVolumeEstimator | ( | VolumeFunctor | fct = VolumeFunctor() | ) |
Default constructor. The object is invalid. The user needs to call setParams and attach.
[in] | fct | the functor for transforming the volume into some quantity. If not precised, a default object is instantiated. |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::IntegralInvariantVolumeEstimator | ( | ConstAlias< KSpace > | K, |
ConstAlias< PointPredicate > | aPointPredicate, | ||
VolumeFunctor | fct = VolumeFunctor() |
||
) |
Constructor.
[in] | K | the cellular grid space in which the shape is defined. |
[in] | aPointPredicate | the shape of interest. The alias can be secured if a some counted pointer is handed. |
[in] | fct | the functor for transforming the volume into some quantity. If not precised, a default object is instantiated. |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::~IntegralInvariantVolumeEstimator | ( | ) |
Destructor.
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::IntegralInvariantVolumeEstimator | ( | const Self & | other | ) |
Copy constructor.
other | the object to clone. |
void DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::attach | ( | ConstAlias< KSpace > | K, |
ConstAlias< PointPredicate > | aPointPredicate | ||
) |
Attach a shape, defined as a functor spel -> boolean
[in] | K | the cellular grid space in which the shape is defined. |
aPointPredicate | the shape of interest. The alias can be secured if a some counted pointer is handed. |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CCellFunctor< ShapeSpelFunctor >) | ) |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CCellularGridSpaceND< KSpace >) | ) |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CPointPredicate< PointPredicate >) | ) |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< VolumeFunctor, Component, Quantity >) | ) |
DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::BOOST_STATIC_ASSERT | ( | (concepts::ConceptUtils::SameType< typename Convolver::Quantity, typename VolumeFunctor::Argument >::value) | ) |
void DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::clear | ( | ) |
Clears the object. It is now invalid.
Quantity DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::eval | ( | SurfelConstIterator | it | ) | const |
– Estimation –
Compute the integral invariant volume at surfel *it of a shape, then apply the VolumeFunctor to extract some geometric information.
SurfelConstIterator | type of Iterator on a Surfel |
[in] | it | iterator pointing on the surfel of the shape where we wish to evaluate some geometric information. |
OutputIterator DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::eval | ( | SurfelConstIterator | itb, |
SurfelConstIterator | ite, | ||
OutputIterator | result | ||
) | const |
– Estimation –
Compute the integral invariant volume for a range of surfels [itb,ite) on a shape, then apply the VolumeFunctor to extract some geometric information. Return the result on an OutputIterator (param).
OutputIterator | type of Iterator of an array of Quantity |
SurfelConstIterator | type of Iterator on a Surfel |
[in] | itb | iterator defining the start of the range of surfels where we wish to compute some geometric information. |
[in] | ite | iterator defining the end of the range of surfels where we wish to compute some geometric information. |
[in] | result | output iterator of results of the computation. |
Scalar DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::h | ( | ) | const |
void DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::init | ( | const double | _h, |
SurfelConstIterator | itb, | ||
SurfelConstIterator | ite | ||
) |
Model of CDigitalSurfaceLocalEstimator. Initialisation.
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::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Self & DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::operator= | ( | const Self & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::IntegralInvariantVolumeEstimator< TKSpace, TPointPredicate, TVolumeFunctor >::setParams | ( | const double | dRadius | ) |
Set specific parameters: the radius of the ball.
[in] | dRadius | the "digital" radius of the kernel (buy may be non integer). |
|
private |
Convolver.
Definition at line 316 of file IntegralInvariantVolumeEstimator.h.
|
private |
Digital kernel.
Definition at line 311 of file IntegralInvariantVolumeEstimator.h.
|
private |
The volume functor that transforms the volume into a quantity.
Definition at line 306 of file IntegralInvariantVolumeEstimator.h.
|
private |
precision of the grid
Definition at line 317 of file IntegralInvariantVolumeEstimator.h.
|
private |
Euclidean kernel.
Definition at line 310 of file IntegralInvariantVolumeEstimator.h.
|
private |
Kernel functor (on Spel)
Definition at line 307 of file IntegralInvariantVolumeEstimator.h.
|
private |
array of begin/end iterator of shifting masks.
Definition at line 308 of file IntegralInvariantVolumeEstimator.h.
|
private |
Array of shifting masks. Size = 9 for each shifting (0-adjacent and full kernel included)
Definition at line 309 of file IntegralInvariantVolumeEstimator.h.
|
private |
Smart pointer (if required) on a point predicate.
Definition at line 312 of file IntegralInvariantVolumeEstimator.h.
|
private |
"digital" radius of the kernel (buy may be non integer).
Definition at line 318 of file IntegralInvariantVolumeEstimator.h.
|
private |
Smart pointer on domain
Definition at line 313 of file IntegralInvariantVolumeEstimator.h.
|
private |
Smart pointer on functor point -> {0,1}.
Definition at line 314 of file IntegralInvariantVolumeEstimator.h.
|
private |
Smart pointer on functor spel -> {0,1}.
Definition at line 315 of file IntegralInvariantVolumeEstimator.h.