31 #if defined(IIGeometricFunctors_RECURSES)
32 #error Recursive header files inclusion detected in IIGeometricFunctors.h
33 #else // defined(IIGeometricFunctors_RECURSES)
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 );
989 #endif // !defined IIGeometricFunctors_h
991 #undef IIGeometricFunctors_RECURSES
992 #endif // else defined(IIGeometricFunctors_RECURSES)
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
IIGaussianCurvature3DFunctor< TSpace > Self
void init(Component h, Component r)
Matrix eigenVectors
A data member only used for temporary calculations.
std::pair< RealVector, RealVector > Quantity
RealVector eigenValues
A data member only used for temporary calculations.
RealVector::Component Component
IIPrincipalCurvaturesAndDirectionsFunctor< TSpace > Self
RealVector::Component Component
Space::RealVector RealVector
Aim: A functor Real -> Real that returns the 2d curvature by transforming the given volume....
IINormalDirectionFunctor()
Default constructor.
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
IIMeanCurvature3DFunctor< TSpace > Self
BOOST_STATIC_ASSERT((Space::dimension >=2))
Matrix eigenVectors
A data member only used for temporary calculations.
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
RealVector::Component Component
BOOST_STATIC_ASSERT((Space::dimension==3))
Value operator()(const Argument &arg) const
static void getEigenDecomposition(const Matrix &matrix, Matrix &eigenVectors, Vector &eigenValues)
Compute both eigen vectors and eigen values from an input matrix.
IISecondPrincipalCurvature3DFunctor< TSpace > Self
RealVector eigenValues
A data member only used for temporary calculations.
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
RealVector::Component Component
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
RealVector eigenValues
A data member only used for temporary calculations.
BOOST_STATIC_ASSERT((Space::dimension==3))
DGtal::uint32_t Dimension
RealVector::Component Component
Value operator()(const Argument &arg) const
IISecondPrincipalDirectionFunctor()
Default constructor.
IIPrincipalDirectionsFunctor()
Default constructor.
RealVector::Component Component
std::pair< Component, Component > Quantity
Aim: A functor Matrix -> RealVector that returns the normal direction by diagonalizing the given cova...
IIFirstPrincipalDirectionFunctor()
Default constructor.
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Space::RealVector RealVector
Matrix eigenVectors
A data member only used for temporary calculations.
Value operator()(const Argument &arg) const
RealVector::Component Component
Space::RealVector RealVector
Self & operator=(const Self &)
Space::RealVector RealVector
Value operator()(const Argument &arg) const
IITangentDirectionFunctor()
Default constructor.
Aim: A functor Matrix -> Real that returns the second principal curvature value by diagonalizing the ...
Space::RealVector RealVector
RealVector::Component Component
TEuclideanRing Component
Type for Vector elements.
Self & operator=(const Self &)
void init(Component, Component)
Aim: A functor Matrix -> RealVector that returns the first principal curvature direction by diagonali...
Space::RealVector RealVector
Self & operator=(const Self &)
Matrix eigenVectors
A data member only used for temporary calculations.
IIPrincipalDirectionsFunctor(const Self &)
Copy constructor. Nothing to do.
Aim: A functor Matrix -> RealVector that returns the tangent direction by diagonalizing the given cov...
Matrix eigenVectors
A data member only used for temporary calculations.
Aim: implements basic MxN Matrix services (M,N>=1).
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Space::RealVector RealVector
IISecondPrincipalDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
Matrix eigenVectors
A data member only used for temporary calculations.
Aim: A functor Matrix -> std::pair<Real,Real> that returns the first and the second principal curvatu...
BOOST_STATIC_ASSERT((Space::dimension==3))
DGtal is the top-level namespace which contains all DGtal functions and types.
RealVector::Component Component
BOOST_STATIC_ASSERT((Space::dimension==3))
Value operator()(const Argument &arg) const
Space::RealVector RealVector
Matrix eigenVectors
A data member only used for temporary calculations.
Matrix eigenVectors
A data member only used for temporary calculations.
Matrix eigenVectors
A data member only used for temporary calculations.
RealVector::Component Component
static const Dimension dimension
static constants to store the dimension.
IISecondPrincipalDirectionFunctor< TSpace > Self
Value operator()(const Argument &arg) const
IIFirstPrincipalDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second princ...
IIFirstPrincipalDirectionFunctor< TSpace > Self
BOOST_STATIC_ASSERT((Space::dimension==2))
void init(Component, Component)
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Aim: A functor Matrix -> Real that returns the first principal curvature value by diagonalizing the g...
RealVector eigenValues
A data member only used for temporary calculations.
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component h, Component r)
IINormalDirectionFunctor< TSpace > Self
void init(Component h, Component r)
Matrix eigenVectors
A data member only used for temporary calculations.
void init(Component h, Component r)
void init(Component, Component)
Value operator()(const Argument &arg) const
RealVector eigenValues
A data member only used for temporary calculations.
IIPrincipalDirectionsFunctor< TSpace > Self
Aim: A functor Matrix -> Real that returns the Gaussian curvature by diagonalizing the given covarian...
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Aim: Represent any static or dynamic sized matrix having sparse or dense representation.
void init(Component h, Component r)
void init(Component, Component)
Aim: A functor Real -> Real that returns the 3d mean curvature by transforming the given volume....
RealVector eigenValues
A data member only used for temporary calculations.
Aim: A functor Matrix -> std::pair<RealVector,RealVector> that returns the first and the second princ...
Aim: Implements basic operations that will be used in Point and Vector classes.
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component h, Component r)
Space::RealVector RealVector
void init(Component, Component)
BOOST_STATIC_ASSERT((Space::dimension >=3))
Value operator()(const Argument &arg) const
IIFirstPrincipalCurvature3DFunctor< TSpace > Self
Space::RealVector RealVector
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Aim: A functor Matrix -> RealVector that returns the second principal curvature direction by diagonal...
IITangentDirectionFunctor< TSpace > Self
Value operator()(const Argument &arg) const
RealVector::Component Component
Space::RealVector RealVector
BOOST_STATIC_ASSERT((Space::dimension==2))
IICurvatureFunctor< TSpace > Self
Self & operator=(const Self &)
RealVector eigenValues
A data member only used for temporary calculations.
void init(Component h, Component r)
BOOST_STATIC_ASSERT((Space::dimension >=3))
RealVector eigenValues
A data member only used for temporary calculations.
Self & operator=(const Self &)
std::tuple< double, double, RealVector, RealVector > Quantity
IITangentDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
IINormalDirectionFunctor(const Self &)
Copy constructor. Nothing to do.
IIPrincipalCurvatures3DFunctor< TSpace > Self
Value operator()(const Argument &arg) const
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
BOOST_CONCEPT_ASSERT((concepts::CMatrix< Matrix >))
Value operator()(const Argument &arg) const
BOOST_STATIC_ASSERT((Space::dimension==3))
RealVector::Component Component
BOOST_STATIC_ASSERT((Space::dimension==3))
Space::RealVector RealVector
Value operator()(const Argument &arg) const