DGtal 1.4.0
Loading...
Searching...
No Matches
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.
 

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

template<typename TShape >
typedef RealPoint DGtal::functors::ShapeGeometricFunctors::ShapeFirstPrincipalDirectionFunctor< TShape >::Argument

Definition at line 390 of file ShapeGeometricFunctors.h.

◆ Quantity

template<typename TShape >
typedef RealVector DGtal::functors::ShapeGeometricFunctors::ShapeFirstPrincipalDirectionFunctor< TShape >::Quantity

Definition at line 391 of file ShapeGeometricFunctors.h.

◆ RealPoint

◆ RealVector

Definition at line 388 of file ShapeGeometricFunctors.h.

◆ Scalar

Definition at line 389 of file ShapeGeometricFunctors.h.

◆ Shape

Definition at line 386 of file ShapeGeometricFunctors.h.

◆ Value

Constructor & Destructor Documentation

◆ ShapeFirstPrincipalDirectionFunctor()

template<typename TShape >
DGtal::functors::ShapeGeometricFunctors::ShapeFirstPrincipalDirectionFunctor< TShape >::ShapeFirstPrincipalDirectionFunctor ( ConstAlias< Shape > aShape = 0)
inline

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 ) {}

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: