DGtal  1.4.beta
DGtal::functors::VCMNormalVectorFunctor< TVCMOnDigitalSurface > Struct Template Reference

Aim: A functor Surfel -> Quantity that returns the outer normal vector at given surfel. 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 RealVector Quantity
 

Public Member Functions

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

Aim: A functor Surfel -> Quantity that returns the outer normal vector at given surfel.

Description of template class 'VCMNormalVectorFunctor'

Template Parameters
TVCMOnDigitalSurfaceany concrete type of VoronoiCovarianceMeasureOnDigitalSurface

Definition at line 59 of file VCMGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

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

Definition at line 65 of file VCMGeometricFunctors.h.

◆ KSpace

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

Definition at line 61 of file VCMGeometricFunctors.h.

◆ Quantity

template<typename TVCMOnDigitalSurface >
typedef RealVector DGtal::functors::VCMNormalVectorFunctor< TVCMOnDigitalSurface >::Quantity

Definition at line 66 of file VCMGeometricFunctors.h.

◆ RealVector

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

Definition at line 63 of file VCMGeometricFunctors.h.

◆ Scalar

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

Definition at line 64 of file VCMGeometricFunctors.h.

◆ Surfel

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

Definition at line 62 of file VCMGeometricFunctors.h.

◆ VCMOnDigitalSurface

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

Definition at line 60 of file VCMGeometricFunctors.h.

Constructor & Destructor Documentation

◆ VCMNormalVectorFunctor()

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

76  : myVCMOnDigitalSurface( aVCMOnDigitalSurface ) {}
CountedConstPtrOrConstPtr< VCMOnDigitalSurface > myVCMOnDigitalSurface
The shape of interest.

Member Function Documentation

◆ attach()

template<typename TVCMOnDigitalSurface >
void DGtal::functors::VCMNormalVectorFunctor< 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 85 of file VCMGeometricFunctors.h.

86  {
87  myVCMOnDigitalSurface = aVCMOnDigitalSurface;
88  }

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

◆ operator()()

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

Map operator Surfel -> RealVector giving the normal vector 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 97 of file VCMGeometricFunctors.h.

98  {
99  typedef typename VCMOnDigitalSurface::Surfel2Normals Surfel2Normals;
100  ASSERT( myVCMOnDigitalSurface != 0 );
101  typename Surfel2Normals::const_iterator itSN = myVCMOnDigitalSurface->mapSurfel2Normals().find( s );
102  ASSERT( itSN != myVCMOnDigitalSurface->mapSurfel2Normals().end() );
103  return - itSN->second.vcmNormal;
104  }

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

Field Documentation

◆ myVCMOnDigitalSurface

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

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