DGtal 1.4.2
|
Aim: An estimator on digital surfaces that returns the reference local geometric quantity. This is used for comparing estimators. More...
#include <DGtal/geometry/surfaces/estimation/TrueDigitalSurfaceLocalEstimator.h>
Public Types | |
typedef TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor > | Self |
typedef TKSpace | KSpace |
typedef TShape | Shape |
typedef TGeometricFunctor | GeometricFunctor |
typedef KSpace::Space | Space |
typedef KSpace::SCell | SCell |
typedef KSpace::Surfel | Surfel |
typedef Space::RealPoint | RealPoint |
typedef RealPoint::Coordinate | Scalar |
typedef GeometricFunctor::Quantity | Quantity |
typedef CanonicSCellEmbedder< KSpace > | SCellEmbedder |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CUnaryFunctor< GeometricFunctor, RealPoint, Quantity >)) | |
~TrueDigitalSurfaceLocalEstimator () | |
TrueDigitalSurfaceLocalEstimator () | |
TrueDigitalSurfaceLocalEstimator (const Self &other) | |
Self & | operator= (const Self &other) |
Scalar | h () const |
void | attach (ConstAlias< Shape > aShape) |
void | setParams (ConstAlias< KSpace > ks, Clone< GeometricFunctor > fct, const int maxIter=20, const Scalar accuracy=0.0001, const Scalar gamma=0.5) |
template<typename SurfelConstIterator > | |
void | init (const Scalar _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 |
RealPoint | embed (Surfel surfel) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Protected Attributes | |
CountedConstPtrOrConstPtr< KSpace > | myKSpace |
The cellular space. | |
CowPtr< GeometricFunctor > | myFct |
The functor RealPoint -> Quantity returning some geometric quantity. | |
SCellEmbedder | myEmbedder |
The surfel embedder. /!\ For now, it is multiplied by myH. | |
CountedConstPtrOrConstPtr< Shape > | myShape |
The shape of interest. | |
Scalar | myH |
The gridstep. | |
bool | myNearest |
Tells if we look for nearest point. | |
int | myMaxIter |
fixes the maximum number of steps (0: takes the point as is). | |
Scalar | myAccuracy |
distance criterion to stop the descent (proximity of implicit function). | |
Scalar | myGamma |
coefficient associated with the gradient (size of each step). | |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< TKSpace >)) | |
Aim: An estimator on digital surfaces that returns the reference local geometric quantity. This is used for comparing estimators.
Description of template class 'TrueDigitalSurfaceLocalEstimator'
Note that you must call methods setParams, attach, then init before calling eval method(s).
It is a model of CDigitalSurfaceLocalEstimator.
TKSpace | the type of cellular grid space, a model of CCellularGridSpaceND. |
TShape | the type of the shape where geometric estimation are made. It must have methods gradient, meanCurvature, etc depending on the chosen functor. |
TGeometricFunctor | the type of the function RealPoint -> Quantity, generally one of ShapeGeometricFunctors::ShapePositionFunctor, ShapeGeometricFunctors::ShapeNormalVectorFunctor, ShapeGeometricFunctors::ShapeMeanCurvatureFunctor, ShapeGeometricFunctors::ShapeGaussianCurvatureFunctor, ShapeGeometricFunctors::ShapeFirstPrincipalCurvatureFunctor, ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor, ShapeGeometricFunctors::ShapeCurvatureTensorFunctor. |
add precise concept CShape
for now we use a CanonicSCellEmbedder times the gridstep to embed surfels.
Definition at line 97 of file TrueDigitalSurfaceLocalEstimator.h.
TGeometricFunctor DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::GeometricFunctor |
Definition at line 105 of file TrueDigitalSurfaceLocalEstimator.h.
TKSpace DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::KSpace |
Definition at line 103 of file TrueDigitalSurfaceLocalEstimator.h.
GeometricFunctor::Quantity DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::Quantity |
Definition at line 111 of file TrueDigitalSurfaceLocalEstimator.h.
Space::RealPoint DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::RealPoint |
Definition at line 109 of file TrueDigitalSurfaceLocalEstimator.h.
RealPoint::Coordinate DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::Scalar |
Definition at line 110 of file TrueDigitalSurfaceLocalEstimator.h.
KSpace::SCell DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::SCell |
Definition at line 107 of file TrueDigitalSurfaceLocalEstimator.h.
CanonicSCellEmbedder<KSpace> DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::SCellEmbedder |
Definition at line 112 of file TrueDigitalSurfaceLocalEstimator.h.
TrueDigitalSurfaceLocalEstimator<TKSpace,TShape,TGeometricFunctor> DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::Self |
Definition at line 102 of file TrueDigitalSurfaceLocalEstimator.h.
TShape DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::Shape |
Definition at line 104 of file TrueDigitalSurfaceLocalEstimator.h.
KSpace::Space DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::Space |
Definition at line 106 of file TrueDigitalSurfaceLocalEstimator.h.
KSpace::Surfel DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::Surfel |
Definition at line 108 of file TrueDigitalSurfaceLocalEstimator.h.
DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::~TrueDigitalSurfaceLocalEstimator | ( | ) |
Destructor.
DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::TrueDigitalSurfaceLocalEstimator | ( | ) |
Default constructor. The estimator is not valid.
DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::TrueDigitalSurfaceLocalEstimator | ( | const Self & | other | ) |
Copy constructor.
other | the object to clone. |
void DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::attach | ( | ConstAlias< Shape > | aShape | ) |
Attach a shape.
aShape | the shape of interest. The alias can be secured if a some counted pointer is handed. |
Referenced by DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalDirections(), DGtal::ShortcutsGeometry< TKSpace >::getGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getNormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getPositions(), DGtal::ShortcutsGeometry< TKSpace >::getPrincipalCurvaturesAndDirections(), DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalCurvatures(), and DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalDirections().
|
private |
DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::BOOST_CONCEPT_ASSERT | ( | (concepts::CUnaryFunctor< GeometricFunctor, RealPoint, Quantity >) | ) |
RealPoint DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::embed | ( | Surfel | surfel | ) | const |
surfel | any surfel. |
Quantity DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::eval | ( | SurfelConstIterator | it | ) | const |
[in] | it | the surfel iterator at which we evaluate the quantity. |
Referenced by DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalDirections(), DGtal::ShortcutsGeometry< TKSpace >::getGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getNormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getPositions(), DGtal::ShortcutsGeometry< TKSpace >::getPrincipalCurvaturesAndDirections(), DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalCurvatures(), and DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalDirections().
OutputIterator DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::eval | ( | SurfelConstIterator | itb, |
SurfelConstIterator | ite, | ||
OutputIterator | result ) const |
[in] | itb | starting surfel iterator. |
[in] | ite | end surfel iterator. |
[in] | result | resulting output iterator |
Scalar DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::h | ( | ) | const |
void DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::init | ( | const Scalar | _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. |
Referenced by DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalDirections(), DGtal::ShortcutsGeometry< TKSpace >::getGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getNormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getPositions(), DGtal::ShortcutsGeometry< TKSpace >::getPrincipalCurvaturesAndDirections(), DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalCurvatures(), and DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalDirections().
bool DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Self & DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::operator= | ( | const Self & | other | ) |
Assignment.
other | the object to copy. |
void DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
void DGtal::TrueDigitalSurfaceLocalEstimator< TKSpace, TShape, TGeometricFunctor >::setParams | ( | ConstAlias< KSpace > | ks, |
Clone< GeometricFunctor > | fct, | ||
const int | maxIter = 20, | ||
const Scalar | accuracy = 0.0001, | ||
const Scalar | gamma = 0.5 ) |
Set specific parameters. They specify the space, the estimated quantity and how the nearest point on the surface is approached.
ks | the cellular grid space. The alias can be secured if a some counted pointer is handed. |
fct | the functor RealPoint -> Quantity returning some geometric quantity. |
maxIter | fixes the maximum number of steps (0: takes the point as is). |
accuracy | distance criterion to stop the descent (proximity of implicit function). |
gamma | coefficient associated with the gradient (size of each step). |
Referenced by DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getFirstPrincipalDirections(), DGtal::ShortcutsGeometry< TKSpace >::getGaussianCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getMeanCurvatures(), DGtal::ShortcutsGeometry< TKSpace >::getNormalVectors(), DGtal::ShortcutsGeometry< TKSpace >::getPositions(), DGtal::ShortcutsGeometry< TKSpace >::getPrincipalCurvaturesAndDirections(), DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalCurvatures(), and DGtal::ShortcutsGeometry< TKSpace >::getSecondPrincipalDirections().
|
protected |
distance criterion to stop the descent (proximity of implicit function).
Definition at line 244 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
The surfel embedder. /!\ For now, it is multiplied by myH.
Definition at line 233 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
The functor RealPoint -> Quantity returning some geometric quantity.
Definition at line 231 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
coefficient associated with the gradient (size of each step).
Definition at line 246 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
The gridstep.
Definition at line 237 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
The cellular space.
Definition at line 229 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
fixes the maximum number of steps (0: takes the point as is).
Definition at line 242 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
Tells if we look for nearest point.
Definition at line 239 of file TrueDigitalSurfaceLocalEstimator.h.
|
protected |
The shape of interest.
Definition at line 235 of file TrueDigitalSurfaceLocalEstimator.h.