DGtal  1.4.beta
DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape > Struct Template Reference

Aim: A functor RealPoint -> Quantity that returns the second principal curvature at given point (i.e. greatest principal curvature). More...

#include <DGtal/shapes/ShapeGeometricFunctors.h>

Public Types

typedef TShape Shape
 
typedef Shape::RealPoint RealPoint
 
typedef Shape::RealVector RealVector
 
typedef RealVector::Component Scalar
 
typedef RealPoint Argument
 
typedef Scalar Quantity
 
typedef Quantity Value
 

Public Member Functions

 ShapeSecondPrincipalCurvatureFunctor (ConstAlias< Shape > aShape=0)
 
void attach (ConstAlias< Shape > aShape)
 
Quantity operator() (const RealPoint &p) const
 

Private Attributes

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

Detailed Description

template<typename TShape>
struct DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape >

Aim: A functor RealPoint -> Quantity that returns the second principal curvature at given point (i.e. greatest principal curvature).

Description of template class 'ShapeSecondPrincipalCurvatureFunctor'

Template Parameters
TShapethe type of the shape where geometric estimation are made. It must have method principalCurvatures.

Definition at line 328 of file ShapeGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

◆ Quantity

Definition at line 334 of file ShapeGeometricFunctors.h.

◆ RealPoint

◆ RealVector

◆ Scalar

◆ Shape

template<typename TShape >
typedef TShape DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape >::Shape

Definition at line 329 of file ShapeGeometricFunctors.h.

◆ Value

Definition at line 335 of file ShapeGeometricFunctors.h.

Constructor & Destructor Documentation

◆ ShapeSecondPrincipalCurvatureFunctor()

Constructor. A shape may also be attached at construction.

Parameters
aShapethe shape of interest. The alias can be secured if a some counted pointer is handed.

Definition at line 343 of file ShapeGeometricFunctors.h.

344  : myShape( aShape ) {}
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.

Member Function Documentation

◆ attach()

template<typename TShape >
void DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape >::attach ( ConstAlias< Shape aShape)
inline

Attach a shape.

Parameters
aShapethe shape of interest. The alias can be secured if a some counted pointer is handed.

Definition at line 352 of file ShapeGeometricFunctors.h.

353  {
354  myShape = aShape;
355  }

References DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape >::myShape.

◆ operator()()

template<typename TShape >
Quantity DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape >::operator() ( const RealPoint p) const
inline

Map operator RealPoint -> Scalar giving the second principal curvature.

Parameters
pany point on the shape.
Returns
the second principal curvature at point p (greatest curvature).

Definition at line 362 of file ShapeGeometricFunctors.h.

363  {
364  Quantity k1, k2;
365  myShape->principalCurvatures( p, k1, k2 );
366  return k2;
367  }

References DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalCurvatureFunctor< TShape >::myShape.

Field Documentation

◆ myShape


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