Ponca  5b0151ad2869758185d699615c3cca5855cc2cee
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::CNC< P, _method > Class Template Reference

Corrected Normal Current Fit type. More...

#include <cnc.h>

+ Inheritance diagram for Ponca::CNC< P, _method >:
+ Collaboration diagram for Ponca::CNC< P, _method >:

Public Types

using DataPoint = P
 
using MatrixType = typename DataPoint::MatrixType
 
using Scalar = typename DataPoint::Scalar
 
using VectorType = typename DataPoint::VectorType
 
typedef Eigen::VectorXd DenseVector
 
typedef Eigen::MatrixXd DenseMatrix
 
using NeighborFilter = NeighborFilterStoreNormal< DataPoint, NoWeightFunc< DataPoint > >
 

Public Member Functions

FIT_RESULT finalize ()
 Finalize the procedure.
 
void init ()
 Set the scalar field values to 0 and reset the isNormalized() status.
 
template<typename PointContainer >
FIT_RESULT compute (const PointContainer &points)
 Compute function for STL-like containers.
 
template<typename IndexRange , typename PointContainer >
FIT_RESULT computeWithIds (const IndexRange &ids, const PointContainer &points)
 Compute function that iterates over a subset of sampled points from an STL-Like container.
 
size_t getNumTriangles () const
 Get the number of triangles that were generated with the compute method.
 
void setNeighborFilter (const NeighborFilter &_nFilter)
 Init the WeightFunc, without changing the other internal states.
 
std::vector< internal::Triangle< DataPoint > > & getTriangles ()
 Returns the triangles.
 
bool operator== (const CNC &other) const
 Comparison operator.
 
bool operator!= (const CNC &other) const
 Comparison operator, convenience function.
 
bool isApprox (const CNC &other, const Scalar &epsilon=Eigen::NumTraits< Scalar >::dummy_precision()) const
 Approximate operator.
 
bool isStable () const
 Is the fitted primitive ready to use (finalize has been called and the result is stable)
 
Scalar kmin () const
 Returns an estimate of the minimal principal curvature value.
 
Scalar kmax () const
 Returns an estimate of the maximal principal curvature value.
 
VectorType kminDirection () const
 Returns an estimate of the minimal principal curvature direction.
 
VectorType kmaxDirection () const
 Returns an estimate of the maximal principal curvature direction.
 
Scalar kMean () const
 Returns an estimate of the mean curvature.
 
Scalar GaussianCurvature () const
 Returns an estimate of the Gaussian curvature.
 

Protected Types

enum  { PROVIDES_PRINCIPAL_CURVATURES }
 

Protected Attributes

NeighborFilter m_nFilter
 
int m_nb_vt {0}
 
std::vector< internal::Triangle< DataPoint > > m_triangles
 
Scalar m_A {0}
 
Scalar m_H {0}
 
Scalar m_G {0}
 
Scalar m_T11 {0}
 
Scalar m_T12 {0}
 
Scalar m_T13 {0}
 
Scalar m_T22 {0}
 
Scalar m_T23 {0}
 
Scalar m_T33 {0}
 
Scalar m_k1 {0}
 
Scalar m_k2 {0}
 
VectorType m_v1
 
VectorType m_v2
 
FIT_RESULT m_eCurrentState {UNDEFINED}
 Represent the current state of the fit (finalize function update the state)
 

Detailed Description

template<class P, TriangleGenerationMethod _method = UniformGeneration>
class Ponca::CNC< P, _method >

Corrected Normal Current Fit type.

This fitting method generates triangles from a set a points cloud and use a statistical formula to compute :

  • The principal curvatures values and directions
  • The mean and gaussian curvatures
See also
PROVIDES_PRINCIPAL_CURVATURES

Definition at line 110 of file cnc.h.

Member Typedef Documentation

◆ DataPoint

template<class P , TriangleGenerationMethod _method = UniformGeneration>
using Ponca::CNC< P, _method >::DataPoint = P

Definition at line 117 of file cnc.h.

◆ DenseMatrix

template<class P , TriangleGenerationMethod _method = UniformGeneration>
typedef Eigen::MatrixXd Ponca::CNC< P, _method >::DenseMatrix

Definition at line 122 of file cnc.h.

◆ DenseVector

template<class P , TriangleGenerationMethod _method = UniformGeneration>
typedef Eigen::VectorXd Ponca::CNC< P, _method >::DenseVector

Definition at line 121 of file cnc.h.

◆ MatrixType

template<class P , TriangleGenerationMethod _method = UniformGeneration>
using Ponca::CNC< P, _method >::MatrixType = typename DataPoint::MatrixType

Definition at line 118 of file cnc.h.

◆ NeighborFilter

template<class P , TriangleGenerationMethod _method = UniformGeneration>
using Ponca::CNC< P, _method >::NeighborFilter = NeighborFilterStoreNormal<DataPoint, NoWeightFunc<DataPoint> >

Definition at line 123 of file cnc.h.

◆ Scalar

template<class P , TriangleGenerationMethod _method = UniformGeneration>
using Ponca::CNC< P, _method >::Scalar = typename DataPoint::Scalar

Definition at line 119 of file cnc.h.

◆ VectorType

template<class P , TriangleGenerationMethod _method = UniformGeneration>
using Ponca::CNC< P, _method >::VectorType = typename DataPoint::VectorType

Definition at line 120 of file cnc.h.

Member Enumeration Documentation

◆ anonymous enum

template<class P , TriangleGenerationMethod _method = UniformGeneration>
anonymous enum
protected

Definition at line 112 of file cnc.h.

Member Function Documentation

◆ compute()

template<class P , TriangleGenerationMethod M>
template<typename PointContainer >
FIT_RESULT Ponca::CNC< P, M >::compute ( const PointContainer &  points)
inline

Compute function for STL-like containers.

Template Parameters
PointContainerAn STL-like container storing the points

Definition at line 345 of file cnc.hpp.

◆ computeWithIds()

template<class P , TriangleGenerationMethod M>
template<typename IndexRange , typename PointContainer >
FIT_RESULT Ponca::CNC< P, M >::computeWithIds ( const IndexRange &  ids,
const PointContainer &  points 
)
inline

Compute function that iterates over a subset of sampled points from an STL-Like container.

Template Parameters
IndexRangeAn STL-like container storing the indices of the neighbors
PointContainerAn STL-like container storing the points

Definition at line 358 of file cnc.hpp.

◆ finalize()

template<class P , TriangleGenerationMethod M>
FIT_RESULT Ponca::CNC< P, M >::finalize ( )
inline

Finalize the procedure.

Returns
Fitting Status
Warning
Must be called be for any use of the fitting output

Definition at line 367 of file cnc.hpp.

◆ GaussianCurvature()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::GaussianCurvature ( ) const
inline

Returns an estimate of the Gaussian curvature.

Definition at line 258 of file cnc.h.

◆ getNumTriangles()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
size_t Ponca::CNC< P, _method >::getNumTriangles ( ) const
inline

Get the number of triangles that were generated with the compute method.

Returns
Returns the number of triangles
See also
CNC::compute

Definition at line 189 of file cnc.h.

◆ getTriangles()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
std::vector< internal::Triangle< DataPoint > > & Ponca::CNC< P, _method >::getTriangles ( )
inline

Returns the triangles.

Returns
A pointer to the array of triangle that was generated during the CNC Fit

Definition at line 203 of file cnc.h.

◆ init()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
void Ponca::CNC< P, _method >::init ( )
inline

Set the scalar field values to 0 and reset the isNormalized() status.

Definition at line 157 of file cnc.h.

◆ isApprox()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
bool Ponca::CNC< P, _method >::isApprox ( const CNC< P, _method > &  other,
const Scalar &  epsilon = Eigen::NumTraits<Scalar>::dummy_precision() 
) const
inline

Approximate operator.

Definition at line 229 of file cnc.h.

◆ isStable()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
bool Ponca::CNC< P, _method >::isStable ( ) const
inline

Is the fitted primitive ready to use (finalize has been called and the result is stable)

Definition at line 240 of file cnc.h.

◆ kmax()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::kmax ( ) const
inline

Returns an estimate of the maximal principal curvature value.

Definition at line 246 of file cnc.h.

◆ kmaxDirection()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
VectorType Ponca::CNC< P, _method >::kmaxDirection ( ) const
inline

Returns an estimate of the maximal principal curvature direction.

Definition at line 252 of file cnc.h.

◆ kMean()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::kMean ( ) const
inline

Returns an estimate of the mean curvature.

Definition at line 255 of file cnc.h.

◆ kmin()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::kmin ( ) const
inline

Returns an estimate of the minimal principal curvature value.

Definition at line 243 of file cnc.h.

◆ kminDirection()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
VectorType Ponca::CNC< P, _method >::kminDirection ( ) const
inline

Returns an estimate of the minimal principal curvature direction.

Definition at line 249 of file cnc.h.

◆ operator!=()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
bool Ponca::CNC< P, _method >::operator!= ( const CNC< P, _method > &  other) const
inline

Comparison operator, convenience function.

Definition at line 223 of file cnc.h.

◆ operator==()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
bool Ponca::CNC< P, _method >::operator== ( const CNC< P, _method > &  other) const
inline

Comparison operator.

Definition at line 208 of file cnc.h.

◆ setNeighborFilter()

template<class P , TriangleGenerationMethod _method = UniformGeneration>
void Ponca::CNC< P, _method >::setNeighborFilter ( const NeighborFilter _nFilter)
inline

Init the WeightFunc, without changing the other internal states.

Calls #startNewPass internally.

Warning
Must be called be for any computation (and before init).
See also
getWeightFunc

Definition at line 194 of file cnc.h.

Member Data Documentation

◆ m_A

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_A {0}
protected

Definition at line 133 of file cnc.h.

◆ m_eCurrentState

template<class P , TriangleGenerationMethod _method = UniformGeneration>
FIT_RESULT Ponca::CNC< P, _method >::m_eCurrentState {UNDEFINED}
protected

Represent the current state of the fit (finalize function update the state)

Definition at line 152 of file cnc.h.

◆ m_G

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_G {0}
protected

Definition at line 135 of file cnc.h.

◆ m_H

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_H {0}
protected

Definition at line 134 of file cnc.h.

◆ m_k1

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_k1 {0}
protected

Definition at line 143 of file cnc.h.

◆ m_k2

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_k2 {0}
protected

Definition at line 144 of file cnc.h.

◆ m_nb_vt

template<class P , TriangleGenerationMethod _method = UniformGeneration>
int Ponca::CNC< P, _method >::m_nb_vt {0}
protected

Definition at line 129 of file cnc.h.

◆ m_nFilter

template<class P , TriangleGenerationMethod _method = UniformGeneration>
NeighborFilter Ponca::CNC< P, _method >::m_nFilter
protected

Definition at line 126 of file cnc.h.

◆ m_T11

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_T11 {0}
protected

Definition at line 136 of file cnc.h.

◆ m_T12

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_T12 {0}
protected

Definition at line 137 of file cnc.h.

◆ m_T13

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_T13 {0}
protected

Definition at line 138 of file cnc.h.

◆ m_T22

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_T22 {0}
protected

Definition at line 139 of file cnc.h.

◆ m_T23

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_T23 {0}
protected

Definition at line 140 of file cnc.h.

◆ m_T33

template<class P , TriangleGenerationMethod _method = UniformGeneration>
Scalar Ponca::CNC< P, _method >::m_T33 {0}
protected

Definition at line 141 of file cnc.h.

◆ m_triangles

template<class P , TriangleGenerationMethod _method = UniformGeneration>
std::vector<internal::Triangle < DataPoint > > Ponca::CNC< P, _method >::m_triangles
protected

Definition at line 130 of file cnc.h.

◆ m_v1

template<class P , TriangleGenerationMethod _method = UniformGeneration>
VectorType Ponca::CNC< P, _method >::m_v1
protected

Definition at line 146 of file cnc.h.

◆ m_v2

template<class P , TriangleGenerationMethod _method = UniformGeneration>
VectorType Ponca::CNC< P, _method >::m_v2
protected

Definition at line 147 of file cnc.h.