DGtal  1.5.beta
DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape > Struct Template Reference

Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvatures and the principal directions as a tuple at given point (k1,k2,d1,d2). 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 std::tuple< Scalar, Scalar, RealVector, RealVectorQuantity
 
typedef Quantity Value
 

Public Member Functions

 ShapePrincipalCurvaturesAndDirectionsFunctor (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::ShapePrincipalCurvaturesAndDirectionsFunctor< TShape >

Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvatures and the principal directions as a tuple at given point (k1,k2,d1,d2).

Description of template class 'ShapePrincipalCurvaturesAndDirectionsFunctor'

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

Definition at line 499 of file ShapeGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

◆ Quantity

◆ RealPoint

◆ RealVector

◆ Scalar

◆ Shape

Definition at line 500 of file ShapeGeometricFunctors.h.

◆ Value

Constructor & Destructor Documentation

◆ ShapePrincipalCurvaturesAndDirectionsFunctor()

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 514 of file ShapeGeometricFunctors.h.

515  : myShape( aShape ) {}

Member Function Documentation

◆ attach()

template<typename TShape >
void DGtal::functors::ShapeGeometricFunctors::ShapePrincipalCurvaturesAndDirectionsFunctor< 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 523 of file ShapeGeometricFunctors.h.

524  {
525  myShape = aShape;
526  }

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

◆ operator()()

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

Map operator RealPoint -> (Scalar,Scalar,RealVector,RealVector) giving the principal curvatures and directions (k1,k2,d1,d2).

Parameters
pany point on the shape.
Returns
the principal curvatures and directions (k1,k2,d1,d2) at point p.

Definition at line 536 of file ShapeGeometricFunctors.h.

537  {
538  Scalar k1, k2;
539  RealVector d1, d2;
540  myShape->principalCurvatures( p, k1, k2 );
541  myShape->principalDirections( p, d1, d2 );
542  return std::make_tuple( k1, k2, d1, d2 );
543  }

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

Field Documentation

◆ myShape


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