31#if defined(IIGeometricFunctors_RECURSES)
32#error Recursive header files inclusion detected in IIGeometricFunctors.h
35#define IIGeometricFunctors_RECURSES
37#if !defined IIGeometricFunctors_h
39#define IIGeometricFunctors_h
45#include "DGtal/base/Common.h"
46#include "DGtal/math/linalg/EigenDecomposition.h"
47#include "DGtal/math/linalg/CMatrix.h"
66 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
140 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
218 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
297 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
375 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
457 template <
typename TSpace,
458 typename TMatrix=
SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension,
470 typedef std::tuple<double, double, RealVector, RealVector>
Quantity;
508 double r3 = r * r * r;
511 d8_5r = 8.0 / ( 5.0 * r );
538 template <
typename TSpace>
575 d1_r2 = 1.0 / ( r * r );
601 template <
typename TSpace>
638 d8_3r = 8.0 / ( 3.0 * r );
640 d_4_PIr4 = 4.0 / ( M_PI * r2 * r2 );
665 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
714 double r3 = r * r * r;
717 d8_5r = 8.0 / ( 5.0 * r );
748 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
796 double r3 = r * r * r;
799 d8_5r = 8.0 / ( 5.0 * r );
830 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
877 double r3 = r * r * r;
880 d8_5r = 8.0 / ( 5.0 * r );
911 template <
typename TSpace,
typename TMatrix=SimpleMatrix<
typename TSpace::RealVector::Component, TSpace::dimension, TSpace::dimension> >
962 double r3 = r * r * r;
965 d8_5r = 8.0 / ( 5.0 * r );
991#undef IIGeometricFunctors_RECURSES
Aim: This class provides methods to compute the eigen decomposition of a matrix. Its objective is to ...
Aim: Implements basic operations that will be used in Point and Vector classes.
TEuclideanRing Component
Type for Vector elements.
Aim: implements basic MxN Matrix services (M,N>=1).
static const Dimension dimension
static constants to store the dimension.
Aim: A functor Matrix -> RealVector that returns the first principal curvature direction by diagonali...
Space::RealVector RealVector
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Value operator()(const Argument &arg) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
BOOST_STATIC_ASSERT((Space::dimension >=2))
IIFirstPrincipalDirectionFunctor()
Default constructor.
RealVector::Component Component
RealVector eigenValues
A data member only used for temporary calculations.
IIFirstPrincipalDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
Matrix eigenVectors
A data member only used for temporary calculations.
Self & operator=(const Self &)
IIFirstPrincipalDirectionFunctor< TSpace > Self
void init(Component, Component)
Aim: A functor Matrix -> RealVector that returns the normal direction by diagonalizing the given cova...
Space::RealVector RealVector
IINormalDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
Self & operator=(const Self &)
IINormalDirectionFunctor()
Default constructor.
RealVector::Component Component
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Value operator()(const Argument &arg) const
RealVector eigenValues
A data member only used for temporary calculations.
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Matrix eigenVectors
A data member only used for temporary calculations.
IINormalDirectionFunctor< TSpace > Self
void init(Component, Component)
Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second princ...
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Space::RealVector RealVector
BOOST_STATIC_ASSERT((Space::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Matrix eigenVectors
A data member only used for temporary calculations.
Value operator()(const Argument &arg) const
RealVector::Component Component
IIPrincipalCurvaturesAndDirectionsFunctor< TSpace > Self
std::tuple< double, double, RealVector, RealVector > Quantity
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component h, Component r)
Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second princ...
Value operator()(const Argument &arg) const
Space::RealVector RealVector
Self & operator=(const Self &)
RealVector eigenValues
A data member only used for temporary calculations.
IIPrincipalDirectionsFunctor()
Default constructor.
std::pair< RealVector, RealVector > Quantity
BOOST_STATIC_ASSERT((Space::dimension >=3))
IIPrincipalDirectionsFunctor(const Self &)
Copy constructor. Nothing to do.
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
void init(Component, Component)
IIPrincipalDirectionsFunctor< TSpace > Self
RealVector::Component Component
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Matrix eigenVectors
A data member only used for temporary calculations.
Aim: A functor Matrix -> RealVector that returns the second principal curvature direction by diagonal...
IISecondPrincipalDirectionFunctor()
Default constructor.
Matrix eigenVectors
A data member only used for temporary calculations.
Value operator()(const Argument &arg) const
RealVector::Component Component
Self & operator=(const Self &)
void init(Component, Component)
RealVector eigenValues
A data member only used for temporary calculations.
IISecondPrincipalDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
Space::RealVector RealVector
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
BOOST_STATIC_ASSERT((Space::dimension >=3))
IISecondPrincipalDirectionFunctor< TSpace > Self
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Aim: A functor Matrix -> RealVector that returns the tangent direction by diagonalizing the given cov...
Value operator()(const Argument &arg) const
IITangentDirectionFunctor< TSpace > Self
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Matrix eigenVectors
A data member only used for temporary calculations.
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component, Component)
IITangentDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
IITangentDirectionFunctor()
Default constructor.
Space::RealVector RealVector
Self & operator=(const Self &)
RealVector::Component Component
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
BOOST_STATIC_ASSERT((Space::dimension==2))
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Aim: A functor Real -> Real that returns the 2d curvature by transforming the given volume....
IICurvatureFunctor< TSpace > Self
BOOST_STATIC_ASSERT((Space::dimension==2))
void init(Component h, Component r)
Value operator()(const Argument &arg) const
Space::RealVector RealVector
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
RealVector::Component Component
Aim: A functor Matrix -> Real that returns the first principal curvature value by diagonalizing the g...
BOOST_STATIC_ASSERT((Space::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
IIFirstPrincipalCurvature3DFunctor< TSpace > Self
RealVector::Component Component
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component h, Component r)
Value operator()(const Argument &arg) const
Space::RealVector RealVector
Matrix eigenVectors
A data member only used for temporary calculations.
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Aim: A functor Matrix -> Real that returns the Gaussian curvature by diagonalizing the given covarian...
IIGaussianCurvature3DFunctor< TSpace > Self
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Space::RealVector RealVector
void init(Component h, Component r)
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
RealVector::Component Component
Value operator()(const Argument &arg) const
Matrix eigenVectors
A data member only used for temporary calculations.
RealVector eigenValues
A data member only used for temporary calculations.
BOOST_STATIC_ASSERT((Space::dimension==3))
Aim: A functor Real -> Real that returns the 3d mean curvature by transforming the given volume....
void init(Component h, Component r)
RealVector::Component Component
Space::RealVector RealVector
IIMeanCurvature3DFunctor< TSpace > Self
BOOST_STATIC_ASSERT((Space::dimension==3))
Value operator()(const Argument &arg) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Aim: A functor Matrix -> std::pair<Real,Real> that returns the first and the second principal curvatu...
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
std::pair< Component, Component > Quantity
void init(Component h, Component r)
Matrix eigenVectors
A data member only used for temporary calculations.
BOOST_STATIC_ASSERT((Space::dimension==3))
Space::RealVector RealVector
RealVector::Component Component
IIPrincipalCurvatures3DFunctor< TSpace > Self
Value operator()(const Argument &arg) const
RealVector eigenValues
A data member only used for temporary calculations.
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Aim: A functor Matrix -> Real that returns the second principal curvature value by diagonalizing the ...
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component h, Component r)
IISecondPrincipalCurvature3DFunctor< TSpace > Self
Space::RealVector RealVector
BOOST_STATIC_ASSERT((Space::dimension==3))
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Matrix eigenVectors
A data member only used for temporary calculations.
RealVector::Component Component
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Value operator()(const Argument &arg) const