DGtal  0.9.4beta
DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix > Struct Template Reference

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

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

## Public Types

typedef IIPrincipalCurvatures3DFunctor< TSpace > Self

typedef TSpace Space

typedef Space::RealVector RealVector

typedef RealVector::Component Component

typedef TMatrix Matrix

typedef Matrix Argument

typedef std::pair< Component, ComponentQuantity

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

double dh5

double d6_PIr6

double 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::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >

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

Description of template class 'IIPrincipalCurvatures3DFunctor'

Template Parameters
 TSpace a model of CSpace, for instance SpaceND. TMatrix a model of CMatrix, for instance SimpleMatrix.
IntegralInvariantCovarianceEstimator

Definition at line 819 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::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::Argument

Definition at line 828 of file IIGeometricFunctors.h.

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

Definition at line 826 of file IIGeometricFunctors.h.

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

Definition at line 827 of file IIGeometricFunctors.h.

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

Definition at line 829 of file IIGeometricFunctors.h.

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

Definition at line 825 of file IIGeometricFunctors.h.

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

Definition at line 823 of file IIGeometricFunctors.h.

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

Definition at line 824 of file IIGeometricFunctors.h.

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

Definition at line 830 of file IIGeometricFunctors.h.

## Member Function Documentation

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::BOOST_CONCEPT_ASSERT ( (concepts::CSpace< TSpace >) )
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 DGtal::functors::IIPrincipalCurvatures3DFunctor< 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::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::init ( Component h, Component r )
inline

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

Parameters
 h the gridstep r the ball radius

Definition at line 867 of file IIGeometricFunctors.h.

868  {
869  double r3 = r * r * r;
870  double r6 = r3 * r3;
871  d6_PIr6 = 6.0 / ( M_PI * r6 );
872  d8_5r = 8.0 / ( 5.0 * r );
873  double h2 = h * h;
874  dh5 = h2 * h2 * h;
875  }
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 Value DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::operator() ( const Argument & arg ) const
inline

Apply operator.

Parameters
 arg any symmetric positive matrix (covariance matrix
Returns
the first and the second principal curvature value in a std::pair for the II covariance matrix, which are the first and the second highest eigenvalue.

Definition at line 844 of file IIGeometricFunctors.h.

845  {
846  Argument cp_arg = arg;
847  cp_arg *= dh5;
848  EigenDecomposition<Space::dimension, Component, Matrix>
849  ::getEigenDecomposition( cp_arg, eigenVectors, eigenValues );
850
851  ASSERT ( !std::isnan(eigenValues[0]) ); // NaN
852  ASSERT ( (std::abs(eigenValues[0]) <= std::abs(eigenValues[1]))
853  && (std::abs(eigenValues[1]) <= std::abs(eigenValues[2])) );
854
855  return Value(
856  d6_PIr6 * ( eigenValues[2] - ( 3.0 * eigenValues[1] )) + d8_5r,
857  d6_PIr6 * ( eigenValues[1] - ( 3.0 * eigenValues[2] )) + d8_5r
858  );
859  }
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>>
 double DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::d6_PIr6
private

Definition at line 879 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 double DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::d8_5r
private

Definition at line 880 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 double DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::dh5
private

Definition at line 878 of file IIGeometricFunctors.h.

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 RealVector DGtal::functors::IIPrincipalCurvatures3DFunctor< TSpace, TMatrix >::eigenValues
mutableprivate

A data member only used for temporary calculations.

Definition at line 885 of file IIGeometricFunctors.h.

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

A data member only used for temporary calculations.

Definition at line 883 of file IIGeometricFunctors.h.

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