DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix > Class Template Reference

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

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

Public Types

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

Public Member Functions

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

Private Attributes

Matrix eigenVectors
 
RealVector eigenValues
 

Detailed Description

template<typename TSpace, typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
class DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >

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

Description of template class 'IISecondPrincipalDirectionFunctor'

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

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

Definition at line 300 of file IIGeometricFunctors.h.

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

Definition at line 298 of file IIGeometricFunctors.h.

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

Definition at line 299 of file IIGeometricFunctors.h.

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

Definition at line 301 of file IIGeometricFunctors.h.

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

Definition at line 297 of file IIGeometricFunctors.h.

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

Definition at line 295 of file IIGeometricFunctors.h.

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

Definition at line 296 of file IIGeometricFunctors.h.

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

Definition at line 302 of file IIGeometricFunctors.h.

Constructor & Destructor Documentation

template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >::IISecondPrincipalDirectionFunctor ( )
inline

Default constructor.

Definition at line 309 of file IIGeometricFunctors.h.

309 {}
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >::IISecondPrincipalDirectionFunctor ( const Self )
inline

Copy constructor. Nothing to do.

Definition at line 311 of file IIGeometricFunctors.h.

311 {}

Member Function Documentation

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

Initializes the functor with the gridstep and the ball Euclidean radius. Not used for this estimator.

Definition at line 343 of file IIGeometricFunctors.h.

343 {}
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Value DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >::operator() ( const Argument arg) const
inline

Apply operator.

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

Definition at line 323 of file IIGeometricFunctors.h.

References DGtal::SpaceND< dim, TInteger >::dimension, DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >::eigenValues, and DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >::eigenVectors.

324  {
325  EigenDecomposition<Space::dimension, Component, Matrix>
326  ::getEigenDecomposition( arg, eigenVectors, eigenValues );
327 
328  ASSERT ( !std::isnan(eigenValues[0]) ); // NaN
329 #ifdef DEBUG
330  for( Dimension i_dim = 1; i_dim < Space::dimension; ++i_dim )
331  {
332  ASSERT ( std::abs(eigenValues[i_dim - 1]) <= std::abs(eigenValues[i_dim]) );
333  }
334 #endif
335 
336  return eigenVectors.column( Space::dimension - 2 ); // second principal curvature direction is associated to greatest eigenvalue.
337  }
static const Dimension dimension
static constants to store the dimension.
Definition: SpaceND.h:132
DGtal::uint32_t Dimension
Definition: Common.h:120
RealVector eigenValues
A data member only used for temporary calculations.
Matrix eigenVectors
A data member only used for temporary calculations.
template<typename TSpace , typename TMatrix = SimpleMatrix< typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension>>
Self& DGtal::functors::IISecondPrincipalDirectionFunctor< TSpace, TMatrix >::operator= ( const Self )
inline

Assignment. Nothing to do.

Returns
itself

Definition at line 314 of file IIGeometricFunctors.h.

314 { return *this; }

Field Documentation

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

A data member only used for temporary calculations.

Definition at line 349 of file IIGeometricFunctors.h.

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

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

A data member only used for temporary calculations.

Definition at line 347 of file IIGeometricFunctors.h.

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


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