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

Aim: A functor Surfel -> Quantity that returns the first principal absolute curvature (greatest 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

 VCMFirstPrincipalAbsoluteCurvatureFunctor (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::VCMFirstPrincipalAbsoluteCurvatureFunctor< TVCMOnDigitalSurface >

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

Description of template class 'VCMFirstPrincipalAbsoluteCurvatureFunctor'

Template Parameters
TVCMOnDigitalSurfaceany concrete type of VoronoiCovarianceMeasureOnDigitalSurface

Definition at line 189 of file VCMGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

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

Definition at line 195 of file VCMGeometricFunctors.h.

◆ KSpace

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

Definition at line 191 of file VCMGeometricFunctors.h.

◆ Quantity

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

Definition at line 196 of file VCMGeometricFunctors.h.

◆ RealVector

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

Definition at line 193 of file VCMGeometricFunctors.h.

◆ Scalar

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

Definition at line 194 of file VCMGeometricFunctors.h.

◆ Surfel

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

Definition at line 192 of file VCMGeometricFunctors.h.

◆ VCMOnDigitalSurface

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

Definition at line 190 of file VCMGeometricFunctors.h.

Constructor & Destructor Documentation

◆ VCMFirstPrincipalAbsoluteCurvatureFunctor()

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

206 : myVCMOnDigitalSurface( aVCMOnDigitalSurface )
207 {
208 BOOST_STATIC_ASSERT(( KSpace::dimension == 3 ));
209 }
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::VCMFirstPrincipalAbsoluteCurvatureFunctor< 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 218 of file VCMGeometricFunctors.h.

219 {
220 myVCMOnDigitalSurface = aVCMOnDigitalSurface;
221 }

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

◆ operator()()

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

Map operator Surfel -> Scalar giving the first 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 230 of file VCMGeometricFunctors.h.

231 {
232 ASSERT( myVCMOnDigitalSurface != 0 );
233 RealVector lambda;
234 bool ok = myVCMOnDigitalSurface->getChiVCMEigenvalues( lambda, s );
235 ASSERT( ok ); boost::ignore_unused_variable_warning( ok );
236
237 // The last eigenvalue l2 is approximately the mixed "area" 2pi R^3 r^2 / 3
238 // The greatest principal curvature is related to the second eigenvalue l1.
239 // k1^2 = 4*l1 / (l2*r^2)
240 return 2.0 * sqrt( lambda[1] / lambda[2] ) / myVCMOnDigitalSurface->r();
241 }

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

Field Documentation

◆ myVCMOnDigitalSurface

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

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