DGtal  1.5.beta
DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder > Class Template Reference

Aim: Estimates Mean curvature using CGAL Jet Fitting and Monge Form. More...

#include <DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingMeanCurvatureEstimator.h>

Public Types

typedef TSurfel Surfel
 
typedef TEmbedder SCellEmbedder
 
typedef double Quantity
 
typedef SCellEmbedder::RealPoint RealPoint
 
typedef CGAL::Cartesian< double > CGALKernel
 
typedef CGALKernel::Point_3 CGALPoint
 
typedef CGAL::Monge_via_jet_fitting< CGALKernelCGALMongeViaJet
 
typedef CGALMongeViaJet::Monge_form CGALMongeForm
 

Public Member Functions

 MongeJetFittingMeanCurvatureEstimator (ConstAlias< SCellEmbedder > anEmbedder, const double h, unsigned int d=4)
 
void pushSurfel (const Surfel &aSurf, const double aDistance)
 
Quantity eval ()
 
void reset ()
 

Private Attributes

const SCellEmbeddermyEmbedder
 Alias of the geometrical embedder. More...
 
std::vector< CGALPointmyPoints
 Array of CGAL points. More...
 
double myH
 Grid step. More...
 
unsigned int myD
 Degree of the polynomial surface to fit. More...
 

Detailed Description

template<typename TSurfel, typename TEmbedder>
class DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >

Aim: Estimates Mean curvature using CGAL Jet Fitting and Monge Form.

Description of template class 'MongeJetFittingMeanCurvatureEstimator'

Be carefull, this functor uses a polynomial surface fitting from point set. Curvature information is given from Monge basis which could be up to the orientation of the normal vector. Hence, if the estimated normal \( n \) is such that \( n\cdot n_0>0\) with \( n_0\) being the true normal at the point set center, everything is ok. Otherwise, we have to inverse the princiapl curvature sign: \( k_1=-k_2\) and \( k_2= -k_1\).

The mean curvature estimation is thus given up to a sign.

model of concepts::CLocalEstimatorFromSurfelFunctor.

Template Parameters
TSurfeltype of surfels
TEmbeddertype of functors which embed surfel to \( \mathbb{R}^3\)

Definition at line 90 of file MongeJetFittingMeanCurvatureEstimator.h.

Member Typedef Documentation

◆ CGALKernel

template<typename TSurfel , typename TEmbedder >
typedef CGAL::Cartesian<double> DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::CGALKernel

Definition at line 99 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ CGALMongeForm

template<typename TSurfel , typename TEmbedder >
typedef CGALMongeViaJet::Monge_form DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::CGALMongeForm

Definition at line 102 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ CGALMongeViaJet

template<typename TSurfel , typename TEmbedder >
typedef CGAL::Monge_via_jet_fitting<CGALKernel> DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::CGALMongeViaJet

Definition at line 101 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ CGALPoint

template<typename TSurfel , typename TEmbedder >
typedef CGALKernel::Point_3 DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::CGALPoint

Definition at line 100 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ Quantity

template<typename TSurfel , typename TEmbedder >
typedef double DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::Quantity

Definition at line 96 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ RealPoint

template<typename TSurfel , typename TEmbedder >
typedef SCellEmbedder::RealPoint DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::RealPoint

Definition at line 97 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ SCellEmbedder

template<typename TSurfel , typename TEmbedder >
typedef TEmbedder DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::SCellEmbedder

Definition at line 95 of file MongeJetFittingMeanCurvatureEstimator.h.

◆ Surfel

template<typename TSurfel , typename TEmbedder >
typedef TSurfel DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::Surfel

Definition at line 94 of file MongeJetFittingMeanCurvatureEstimator.h.

Constructor & Destructor Documentation

◆ MongeJetFittingMeanCurvatureEstimator()

template<typename TSurfel , typename TEmbedder >
DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::MongeJetFittingMeanCurvatureEstimator ( ConstAlias< SCellEmbedder anEmbedder,
const double  h,
unsigned int  d = 4 
)
inline

Constructor.

Parameters
anEmbedderembedder to map surfel to R^n.
hgridstep.
ddegree of the polynomial surface to fit.

Definition at line 111 of file MongeJetFittingMeanCurvatureEstimator.h.

112  :
113  myEmbedder(&anEmbedder), myH(h), myD(d)
114  {
115  FATAL_ERROR_MSG(d>=2,"Polynomial surface degree must be greater than 2");
116  }
const SCellEmbedder * myEmbedder
Alias of the geometrical embedder.
unsigned int myD
Degree of the polynomial surface to fit.

Member Function Documentation

◆ eval()

template<typename TSurfel , typename TEmbedder >
Quantity DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::eval ( )
inline

Evaluate the curvature from Monge form.

Returns
the mean curvature

Definition at line 139 of file MongeJetFittingMeanCurvatureEstimator.h.

140  {
141  CGALMongeForm monge_form;
142  CGALMongeViaJet monge_fit;
143 
144  monge_form = monge_fit(myPoints.begin() , myPoints.end(), myD, (2<myD)? myD : 2);
145 
146  double k1 = monge_form.principal_curvatures ( 0 );
147  double k2 = monge_form.principal_curvatures ( 1 );
148  return 0.5*(k1+k2);
149  }

References DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myD, and DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myPoints.

◆ pushSurfel()

template<typename TSurfel , typename TEmbedder >
void DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::pushSurfel ( const Surfel aSurf,
const double  aDistance 
)
inline

Add the geometrical embedding of a surfel to the point list

Parameters
aSurfa surfel to add
aDistanceof aSurf to the neighborhood boundary

Definition at line 124 of file MongeJetFittingMeanCurvatureEstimator.h.

126  {
127  BOOST_VERIFY(aDistance==aDistance);
128 
129  RealPoint p = myEmbedder->operator()(aSurf);
130  CGALPoint pp(p[0]*myH,p[1]*myH,p[2]*myH);
131  myPoints.push_back(pp);
132  }
PointVector< 3, double > RealPoint

References DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myEmbedder, DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myH, and DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myPoints.

◆ reset()

template<typename TSurfel , typename TEmbedder >
void DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::reset ( )
inline

Reset the point list.

Definition at line 155 of file MongeJetFittingMeanCurvatureEstimator.h.

156  {
157  myPoints.clear();
158  }

References DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myPoints.

Field Documentation

◆ myD

template<typename TSurfel , typename TEmbedder >
unsigned int DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myD
private

Degree of the polynomial surface to fit.

Definition at line 173 of file MongeJetFittingMeanCurvatureEstimator.h.

Referenced by DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::eval().

◆ myEmbedder

template<typename TSurfel , typename TEmbedder >
const SCellEmbedder* DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myEmbedder
private

◆ myH

template<typename TSurfel , typename TEmbedder >
double DGtal::functors::MongeJetFittingMeanCurvatureEstimator< TSurfel, TEmbedder >::myH
private

◆ myPoints


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