DGtal  1.5.beta
DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix > Struct Template Reference

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. More...

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

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::CMatrix< Matrix >))

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
A data member only used for temporary calculations. More...

RealVector eigenValues
A data member only used for temporary calculations. More...

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
 TSpace a model of CSpace, for instance SpaceND. TMatrix a model of CMatrix, for instance SimpleMatrix.
IntegralInvariantCovarianceEstimator

Definition at line 831 of file IIGeometricFunctors.h.

◆ Argument

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 840 of file IIGeometricFunctors.h.

◆ Component

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 838 of file IIGeometricFunctors.h.

◆ Matrix

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 839 of file IIGeometricFunctors.h.

◆ Quantity

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 841 of file IIGeometricFunctors.h.

◆ RealVector

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 837 of file IIGeometricFunctors.h.

◆ Self

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

Definition at line 835 of file IIGeometricFunctors.h.

◆ Space

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 836 of file IIGeometricFunctors.h.

◆ Value

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 842 of file IIGeometricFunctors.h.

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
 DGtal::functors::IISecondPrincipalCurvature3DFunctor< TSpace, TMatrix >::BOOST_CONCEPT_ASSERT ( (concepts::CMatrix< Matrix >) )

◆ BOOST_CONCEPT_ASSERT() [2/2]

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

◆ BOOST_STATIC_ASSERT()

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

◆ init()

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
 h the gridstep r the ball radius

Definition at line 875 of file IIGeometricFunctors.h.

876  {
877  double r3 = r * r * r;
878  double r6 = r3 * r3;
879  d6_PIr6 = 6.0 / ( M_PI * r6 );
880  d8_5r = 8.0 / ( 5.0 * r );
881  double h2 = h * h;
882  dh5 = h2 * h2 * h;
883  }

◆ operator()()

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
 arg any 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 855 of file IIGeometricFunctors.h.

856  {
857  Argument cp_arg = arg;
858  cp_arg *= dh5;
861
862  ASSERT ( !std::isnan(eigenValues[0]) ); // NaN
863  ASSERT ( (std::abs(eigenValues[0]) <= std::abs(eigenValues[1]))
864  && (std::abs(eigenValues[1]) <= std::abs(eigenValues[2])) );
865
866  return d6_PIr6 * ( eigenValues[1] - ( 3.0 * eigenValues[2] )) + d8_5r;
867  }
static void getEigenDecomposition(const Matrix &matrix, Matrix &eigenVectors, Vector &eigenValues)
Compute both eigen vectors and eigen values from an input matrix.
RealVector eigenValues
A data member only used for temporary calculations.
Matrix eigenVectors
A data member only used for temporary calculations.

◆ d6_PIr6

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

Definition at line 887 of file IIGeometricFunctors.h.

◆ d8_5r

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

Definition at line 888 of file IIGeometricFunctors.h.

◆ dh5

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

Definition at line 886 of file IIGeometricFunctors.h.

◆ eigenValues

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 893 of file IIGeometricFunctors.h.

◆ eigenVectors

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 891 of file IIGeometricFunctors.h.

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