31#if defined(CorrectedNormalCurrentComputer_RECURSES)
32#error Recursive header files inclusion detected in CorrectedNormalCurrentComputer.h
35#define CorrectedNormalCurrentComputer_RECURSES
37#if !defined CorrectedNormalCurrentComputer_h
39#define CorrectedNormalCurrentComputer_h
43#include "DGtal/base/Common.h"
44#include "DGtal/math/linalg/EigenDecomposition.h"
45#include "DGtal/geometry/meshes/SurfaceMeshMeasure.h"
46#include "DGtal/geometry/meshes/CorrectedNormalCurrentFormula.h"
47#include "DGtal/shapes/SurfaceMesh.h"
68 template <
typename TRealPo
int,
typename TRealVector >
102 bool unit_u =
false );
128 return ( mu0 != 0.0 ) ? mu1 / ( 2.0 * mu0 ) : 0.0;
137 return ( mu0 != 0.0 ) ? mu2 / mu0 : 0.0;
148 std::tuple< Scalar, Scalar, RealVector, RealVector >
153 const double coef_N = 1000.0 * mu0;
156 for (
int j = 0; j < 3; j++ )
157 for (
int k = 0; k < 3; k++ )
158 muXY( j, k ) += coef_N * N[ j ] * N[ k ];
162 return std::make_tuple( ( mu0 != 0.0 ) ? -L[ 1 ] / mu0 : 0.0,
163 ( mu0 != 0.0 ) ? -L[ 0 ] / mu0 : 0.0,
236#include "CorrectedNormalCurrentComputer.ih"
242#undef CorrectedNormalCurrentComputer_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
static void getEigenDecomposition(const Matrix &matrix, Matrix &eigenVectors, Vector &eigenValues)
Compute both eigen vectors and eigen values from an input matrix.
TEuclideanRing Component
Type for Vector elements.
static const Dimension dimension
Aim: implements basic MxN Matrix services (M,N>=1).
ColumnVector column(const DGtal::Dimension j) const
SimpleMatrix< Component, TN, TM > transpose() const
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Aim: Utility class to compute curvature measures induced by (1) a corrected normal current defined by...
static const Dimension dimension
BOOST_STATIC_ASSERT((dimension==3))
SurfaceMeshMeasure< RealPoint, RealVector, Scalar > ScalarMeasure
ScalarMeasure computeMu0InterpolatedU() const
CorrectedNormalCurrentComputer< RealPoint, RealVector > Self
SurfaceMeshMeasure< RealPoint, RealVector, RealTensor > TensorMeasure
std::vector< RealVector > RealVectors
ScalarMeasure computeMu1ConstantU() const
const SurfaceMesh & myMesh
A reference to the mesh over which computations are done.
std::vector< RealTensor > RealTensors
ScalarMeasure computeMu2ConstantU() const
ScalarMeasure computeMu1InterpolatedU() const
std::vector< Scalar > Scalars
DGtal::SurfaceMesh< RealPoint, RealVector > SurfaceMesh
CorrectedNormalCurrentComputer(ConstAlias< SurfaceMesh > aMesh, bool unit_u=false)
SimpleMatrix< Scalar, dimension, dimension > RealTensor
RealVector::Component Scalar
ScalarMeasure computeMu0ConstantU() const
TensorMeasure computeMuXYInterpolatedU() const
ScalarMeasure computeMu1() const
ScalarMeasure computeMu2() const
ScalarMeasure computeMu2InterpolatedU() const
static std::tuple< Scalar, Scalar, RealVector, RealVector > principalCurvatures(Scalar mu0, RealTensor muXY, const RealVector &N)
CorrectedNormalCurrentFormula< RealPoint, RealVector > Formula
TensorMeasure computeMuXYConstantU() const
static Scalar meanCurvature(Scalar mu0, Scalar mu1)
static Scalar GaussianCurvature(Scalar mu0, Scalar mu2)
SurfaceMesh::Vertex Vertex
TensorMeasure computeMuXY() const
ScalarMeasure computeMu0() const
std::vector< RealPoint > RealPoints
Aim: stores an arbitrary measure on a SurfaceMesh object. The measure can be spread onto its vertices...
Aim: Represents an embedded mesh as faces and a list of vertices. Vertices may be shared among faces ...
std::size_t Index
The type used for numbering vertices and faces.
std::size_t Size
The type for counting elements.