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

Aim: A functor RealPoint -> RealVector that returns the first principal direction at given point (i.e. direction of smallest 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 RealVector Quantity
 
typedef Quantity Value
 

Public Member Functions

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

Aim: A functor RealPoint -> RealVector that returns the first principal direction at given point (i.e. direction of smallest principal curvature).

Description of template class 'ShapeFirstPrincipalDirectionFunctor'

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

Definition at line 385 of file ShapeGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

Definition at line 390 of file ShapeGeometricFunctors.h.

◆ Quantity

◆ RealPoint

◆ RealVector

◆ Scalar

◆ Shape

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

Definition at line 386 of file ShapeGeometricFunctors.h.

◆ Value

Definition at line 392 of file ShapeGeometricFunctors.h.

Constructor & Destructor Documentation

◆ ShapeFirstPrincipalDirectionFunctor()

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

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

Member Function Documentation

◆ attach()

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

410  {
411  myShape = aShape;
412  }

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

◆ operator()()

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

Map operator RealPoint -> Scalar giving the first principal direction (i.e. direction of first/smallest principal curvature).

Parameters
pany point on the shape.
Returns
the first principal direction at point p.

Definition at line 419 of file ShapeGeometricFunctors.h.

420  {
421  Quantity d1, d2;
422  myShape->principalDirections( p, d1, d2 );
423  return d1;
424  }

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

Field Documentation

◆ myShape


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