DGtal  1.1.0
Public Types | Public Member Functions | Private Attributes
DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalDirectionFunctor< TShape > Struct Template Reference

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

#include <DGtal/shapes/ShapeGeometricFunctors.h>

Collaboration diagram for DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalDirectionFunctor< TShape >:
[legend]

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

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

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

Description of template class 'ShapeSecondPrincipalDirectionFunctor'

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

Definition at line 442 of file ShapeGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

Definition at line 447 of file ShapeGeometricFunctors.h.

◆ Quantity

Definition at line 448 of file ShapeGeometricFunctors.h.

◆ RealPoint

Definition at line 444 of file ShapeGeometricFunctors.h.

◆ RealVector

Definition at line 445 of file ShapeGeometricFunctors.h.

◆ Scalar

Definition at line 446 of file ShapeGeometricFunctors.h.

◆ Shape

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

Definition at line 443 of file ShapeGeometricFunctors.h.

◆ Value

Definition at line 449 of file ShapeGeometricFunctors.h.

Constructor & Destructor Documentation

◆ ShapeSecondPrincipalDirectionFunctor()

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

458  : myShape( aShape ) {}

Member Function Documentation

◆ attach()

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

467  {
468  myShape = aShape;
469  }

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

◆ operator()()

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

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

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

Definition at line 476 of file ShapeGeometricFunctors.h.

477  {
478  Quantity d1, d2;
479  myShape->principalDirections( p, d1, d2 );
480  return d2;
481  }

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

Field Documentation

◆ myShape


The documentation for this struct was generated from the following file:
DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalDirectionFunctor::myShape
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Definition: ShapeGeometricFunctors.h:485
DGtal::functors::ShapeGeometricFunctors::ShapeSecondPrincipalDirectionFunctor::Quantity
RealVector Quantity
Definition: ShapeGeometricFunctors.h:448