DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface > Struct Template Reference

Aim: A functor Surfel -> Quantity that returns the mean of absolute curvatures at given surfel: (abs(k1)+abs(k2))/2. This class has meaning only in 3D. More...

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

Public Types

typedef TVCMOnDigitalSurface VCMOnDigitalSurface
 
typedef VCMOnDigitalSurface::KSpace KSpace
 
typedef VCMOnDigitalSurface::Surfel Surfel
 
typedef VCMOnDigitalSurface::VectorN RealVector
 
typedef RealVector::Component Scalar
 
typedef Surfel Argument
 
typedef Scalar Quantity
 

Public Member Functions

 VCMMeanAbsoluteCurvatures3DFunctor (ConstAlias< VCMOnDigitalSurface > aVCMOnDigitalSurface=0)
 
void attach (ConstAlias< VCMOnDigitalSurface > aVCMOnDigitalSurface)
 
Quantity operator() (const Surfel &s) const
 

Private Attributes

CountedConstPtrOrConstPtr< VCMOnDigitalSurfacemyVCMOnDigitalSurface
 The shape of interest. More...
 

Detailed Description

template<typename TVCMOnDigitalSurface>
struct DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >

Aim: A functor Surfel -> Quantity that returns the mean of absolute curvatures at given surfel: (abs(k1)+abs(k2))/2. This class has meaning only in 3D.

Description of template class 'VCMMeanAbsoluteCurvatures3DFunctor'

Template Parameters
TVCMOnDigitalSurfaceany concrete type of VoronoiCovarianceMeasureOnDigitalSurface

Definition at line 326 of file VCMGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

template<typename TVCMOnDigitalSurface >
typedef Surfel DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::Argument

Definition at line 332 of file VCMGeometricFunctors.h.

◆ KSpace

template<typename TVCMOnDigitalSurface >
typedef VCMOnDigitalSurface::KSpace DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::KSpace

Definition at line 328 of file VCMGeometricFunctors.h.

◆ Quantity

template<typename TVCMOnDigitalSurface >
typedef Scalar DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::Quantity

Definition at line 333 of file VCMGeometricFunctors.h.

◆ RealVector

template<typename TVCMOnDigitalSurface >
typedef VCMOnDigitalSurface::VectorN DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::RealVector

Definition at line 330 of file VCMGeometricFunctors.h.

◆ Scalar

template<typename TVCMOnDigitalSurface >
typedef RealVector::Component DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::Scalar

Definition at line 331 of file VCMGeometricFunctors.h.

◆ Surfel

template<typename TVCMOnDigitalSurface >
typedef VCMOnDigitalSurface::Surfel DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::Surfel

Definition at line 329 of file VCMGeometricFunctors.h.

◆ VCMOnDigitalSurface

template<typename TVCMOnDigitalSurface >
typedef TVCMOnDigitalSurface DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::VCMOnDigitalSurface

Definition at line 327 of file VCMGeometricFunctors.h.

Constructor & Destructor Documentation

◆ VCMMeanAbsoluteCurvatures3DFunctor()

template<typename TVCMOnDigitalSurface >
DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::VCMMeanAbsoluteCurvatures3DFunctor ( ConstAlias< VCMOnDigitalSurface aVCMOnDigitalSurface = 0)
inline

Constructor. A VCM may also be attached at construction.

Parameters
aVCMOnDigitalSurfacethe VCM on surface that stores all the information. The alias can be secured if some counted pointer is handed.

Definition at line 342 of file VCMGeometricFunctors.h.

343 : myVCMOnDigitalSurface( aVCMOnDigitalSurface )
344 {
345 BOOST_STATIC_ASSERT(( KSpace::dimension == 3 ));
346 }
static const constexpr Dimension dimension
CountedConstPtrOrConstPtr< VCMOnDigitalSurface > myVCMOnDigitalSurface
The shape of interest.

References DGtal::KhalimskySpaceND< dim, TInteger >::dimension.

Member Function Documentation

◆ attach()

template<typename TVCMOnDigitalSurface >
void DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::attach ( ConstAlias< VCMOnDigitalSurface aVCMOnDigitalSurface)
inline

Attach a VCM on a digital surface.

Parameters
aVCMOnDigitalSurfaceon surface that stores all the information. The alias can be secured if some counted pointer is handed.

Definition at line 355 of file VCMGeometricFunctors.h.

356 {
357 myVCMOnDigitalSurface = aVCMOnDigitalSurface;
358 }

References DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::myVCMOnDigitalSurface.

◆ operator()()

template<typename TVCMOnDigitalSurface >
Quantity DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::operator() ( const Surfel s) const
inline

Map operator Surfel -> Scalar giving the mean of absolute curvatures estimated by the VCM object. Complexity is \( O(log n) \), if n is the number of surfels of the surface.

Parameters
sany surfel of the shape.
Returns
the normal at point p (as the normalized gradient).

Definition at line 367 of file VCMGeometricFunctors.h.

368 {
369 ASSERT( myVCMOnDigitalSurface != 0 );
370 RealVector lambda;
371 bool ok = myVCMOnDigitalSurface->getChiVCMEigenvalues( lambda, s );
372 ASSERT( ok ); boost::ignore_unused_variable_warning( ok );
373
374 // The last eigenvalue l2 is approximately the mixed "area" 2pi R^3 r^2 / 3
375 // The greatest principal curvature is related to the second eigenvalue l1.
376 // k1^2 = 4*l1 / (l2*r^2)
377 Quantity k1 = 2.0 * sqrt( lambda[1] / lambda[2] ) / myVCMOnDigitalSurface->r();
378
379 // The last eigenvalue l2 is approximately the mixed "area" 2pi R^3 r^2 / 3
380 // The smallest principal curvature is related to the first eigenvalue l0.
381 // k2^2 = 4*l0 / (l2*r^2)
382 Quantity k2 = 2.0 * sqrt( lambda[0] / lambda[2] ) / myVCMOnDigitalSurface->r();
383 return (k1+k2) * 0.5;
384 }

References DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::myVCMOnDigitalSurface.

Field Documentation

◆ myVCMOnDigitalSurface

template<typename TVCMOnDigitalSurface >
CountedConstPtrOrConstPtr<VCMOnDigitalSurface> DGtal::functors::VCMMeanAbsoluteCurvatures3DFunctor< TVCMOnDigitalSurface >::myVCMOnDigitalSurface
private

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