DGtal  0.9.3beta
Public Types | Public Member Functions | Private Attributes
DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix > Struct Template Reference

#include <DGtal/geometry/surfaces/estimation/IIGeometricFunctors.h>

Collaboration diagram for DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >:
[legend]

Public Types

typedef IISecondPrincipalCurvature3DFunctor< TSpace > Self
 
typedef TSpace Space
 
typedef Space::RealVector RealVector
 
typedef RealVector::Component Component
 
typedef TMatrix Matrix
 
typedef Matrix Argument
 
typedef Component Quantity
 
typedef Quantity Value
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >))
 
 BOOST_STATIC_ASSERT ((Space::dimension==3))
 
Value operator() (const Argument &arg) const
 
void init (Component h, Component r)
 

Private Attributes

Quantity dh5
 
Quantity d6_PIr6
 
Quantity d8_5r
 
Matrix eigenVectors
 
RealVector eigenValues
 

Detailed Description

template<typename TSpace, typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
struct DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >

Aim: A functor Matrix -> Real that returns the second principal curvature value by diagonalizing the given covariance matrix. This functor is valid starting from 3D space. Note that by second we mean the value with second greatest curvature in absolute value.

Description of template class 'IISecondPrincipalCurvature3DFunctor'

Template Parameters
TSpacea model of CSpace, for instance SpaceND.
TMatrixa model of CMatrix, for instance SimpleMatrix.
See also
IntegralInvariantCovarianceEstimator

Definition at line 738 of file IIGeometricFunctors.h.

Member Typedef Documentation

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef Matrix DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Argument

Definition at line 747 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef RealVector::Component DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Component

Definition at line 745 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef TMatrix DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Matrix

Definition at line 746 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef Component DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Quantity

Definition at line 748 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef Space::RealVector DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::RealVector

Definition at line 744 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef IISecondPrincipalCurvature3DFunctor<TSpace> DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Self

Definition at line 742 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef TSpace DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Space

Definition at line 743 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
typedef Quantity DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::Value

Definition at line 749 of file IIGeometricFunctors.h.

Member Function Documentation

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >)  )
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::BOOST_STATIC_ASSERT ( (Space::dimension==3)  )
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
void DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::init ( Component  h,
Component  r 
)
inline

Initializes the functor with the gridstep and the ball Euclidean radius.

Parameters
hthe gridstep
rthe ball radius

Definition at line 782 of file IIGeometricFunctors.h.

References DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::d6_PIr6, DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::d8_5r, and DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::dh5.

783  {
784  double r3 = r * r * r;
785  double r6 = r3 * r3;
786  d6_PIr6 = 6.0 / ( M_PI * r6 );
787  d8_5r = 8.0 / ( 5.0 * r );
788  double h2 = h * h;
789  dh5 = h2 * h2 * h;
790  }
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Value DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::operator() ( const Argument arg) const
inline

Apply operator.

Parameters
argany symmetric positive matrix (covariance matrix
Returns
the second principal curvature value for the II covariance matrix, which is the second highest eigenvalue.

Definition at line 762 of file IIGeometricFunctors.h.

References DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::d6_PIr6, DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::d8_5r, DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::dh5, DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::eigenValues, and DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::eigenVectors.

763  {
764  Argument cp_arg = arg;
765  cp_arg *= dh5;
766  EigenDecomposition<Space::dimension, Component, Matrix>
767  ::getEigenDecomposition( cp_arg, eigenVectors, eigenValues );
768 
769  ASSERT ( !std::isnan(eigenValues[0]) ); // NaN
770  ASSERT ( (std::abs(eigenValues[0]) <= std::abs(eigenValues[1]))
771  && (std::abs(eigenValues[1]) <= std::abs(eigenValues[2])) );
772 
773  return d6_PIr6 * ( eigenValues[1] - ( 3.0 * eigenValues[2] )) + d8_5r;
774  }
Matrix eigenVectors
A data member only used for temporary calculations.
RealVector eigenValues
A data member only used for temporary calculations.

Field Documentation

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Quantity DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::d6_PIr6
private
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Quantity DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::d8_5r
private
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Quantity DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::dh5
private
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
RealVector DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::eigenValues
mutableprivate

A data member only used for temporary calculations.

Definition at line 800 of file IIGeometricFunctors.h.

Referenced by DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::operator()().

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Matrix DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::eigenVectors
mutableprivate

A data member only used for temporary calculations.

Definition at line 798 of file IIGeometricFunctors.h.

Referenced by DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::operator()().


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