DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::functors::VCMSecondPrincipalAbsoluteCurvatureFunctor< TVCMOnDigitalSurface > Struct Template Reference

Aim: A functor Surfel -> Quantity that returns the second principal absolute curvature (smallest curvature) at given surfel. 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

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

Private Attributes

CountedConstPtrOrConstPtr< VCMOnDigitalSurfacemyVCMOnDigitalSurface
 The shape of interest.
 

Detailed Description

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

Aim: A functor Surfel -> Quantity that returns the second principal absolute curvature (smallest curvature) at given surfel. This class has meaning only in 3D.

Description of template class 'VCMSecondPrincipalAbsoluteCurvatureFunctor'

Template Parameters
TVCMOnDigitalSurfaceany concrete type of VoronoiCovarianceMeasureOnDigitalSurface

Definition at line 258 of file VCMGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

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

Definition at line 264 of file VCMGeometricFunctors.h.

◆ KSpace

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

Definition at line 260 of file VCMGeometricFunctors.h.

◆ Quantity

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

Definition at line 265 of file VCMGeometricFunctors.h.

◆ RealVector

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

Definition at line 262 of file VCMGeometricFunctors.h.

◆ Scalar

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

Definition at line 263 of file VCMGeometricFunctors.h.

◆ Surfel

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

Definition at line 261 of file VCMGeometricFunctors.h.

◆ VCMOnDigitalSurface

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

Definition at line 259 of file VCMGeometricFunctors.h.

Constructor & Destructor Documentation

◆ VCMSecondPrincipalAbsoluteCurvatureFunctor()

template<typename TVCMOnDigitalSurface >
DGtal::functors::VCMSecondPrincipalAbsoluteCurvatureFunctor< TVCMOnDigitalSurface >::VCMSecondPrincipalAbsoluteCurvatureFunctor ( 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 274 of file VCMGeometricFunctors.h.

275 : myVCMOnDigitalSurface( aVCMOnDigitalSurface )
276 {
277 BOOST_STATIC_ASSERT(( KSpace::dimension == 3 ));
278 }
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::VCMSecondPrincipalAbsoluteCurvatureFunctor< 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 287 of file VCMGeometricFunctors.h.

288 {
289 myVCMOnDigitalSurface = aVCMOnDigitalSurface;
290 }

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

◆ operator()()

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

Map operator Surfel -> Scalar giving the second principal absolute curvature 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 299 of file VCMGeometricFunctors.h.

300 {
301 ASSERT( myVCMOnDigitalSurface != 0 );
302 RealVector lambda;
303 bool ok = myVCMOnDigitalSurface->getChiVCMEigenvalues( lambda, s );
304 ASSERT( ok ); boost::ignore_unused_variable_warning( ok );
305
306 // The last eigenvalue l2 is approximately the mixed "area" 2pi R^3 r^2 / 3
307 // The smallest principal curvature is related to the first eigenvalue l0.
308 // k2^2 = 4*l0 / (l2*r^2)
309 return 2.0 * sqrt( lambda[0] / lambda[2] ) / myVCMOnDigitalSurface->r();
310 }

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

Field Documentation

◆ myVCMOnDigitalSurface


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