DGtal 1.3.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes
DGtal::functors::MongeJetFittingGaussianCurvatureEstimator< TSurfel, TEmbedder > Class Template Reference

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

#include <DGtal/geometry/surfaces/estimation/estimationFunctors/MongeJetFittingGaussianCurvatureEstimator.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

 MongeJetFittingGaussianCurvatureEstimator (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::MongeJetFittingGaussianCurvatureEstimator< TSurfel, TEmbedder >

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

Description of template class 'MongeJetFittingGaussianCurvatureEstimator'

model of concepts::CLocalEstimatorFromSurfelFunctor.

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

Definition at line 77 of file MongeJetFittingGaussianCurvatureEstimator.h.

Member Typedef Documentation

◆ CGALKernel

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

Definition at line 86 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ CGALMongeForm

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

Definition at line 89 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ CGALMongeViaJet

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

Definition at line 88 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ CGALPoint

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

Definition at line 87 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ Quantity

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

Definition at line 83 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ RealPoint

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

Definition at line 84 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ SCellEmbedder

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

Definition at line 82 of file MongeJetFittingGaussianCurvatureEstimator.h.

◆ Surfel

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

Definition at line 81 of file MongeJetFittingGaussianCurvatureEstimator.h.

Constructor & Destructor Documentation

◆ MongeJetFittingGaussianCurvatureEstimator()

template<typename TSurfel , typename TEmbedder >
DGtal::functors::MongeJetFittingGaussianCurvatureEstimator< TSurfel, TEmbedder >::MongeJetFittingGaussianCurvatureEstimator ( 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 98 of file MongeJetFittingGaussianCurvatureEstimator.h.

99 :
100 myEmbedder(&anEmbedder), myH(h), myD(d)
101 {
102 FATAL_ERROR_MSG(d>=2,"Polynomial surface degree must be greater than 2");
103 }
const SCellEmbedder * myEmbedder
Alias of the geometrical embedder.

Member Function Documentation

◆ eval()

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

Evaluate the curvature from Monge form.

Returns
the mean curvature

Definition at line 126 of file MongeJetFittingGaussianCurvatureEstimator.h.

127 {
128 CGALMongeForm monge_form;
129 CGALMongeViaJet monge_fit;
130
131 monge_form = monge_fit(myPoints.begin() , myPoints.end(), myD, (2<myD)? myD : 2);
132
133 double k1 = monge_form.principal_curvatures ( 0 );
134 double k2 = monge_form.principal_curvatures ( 1 );
135 return (k1*k2);
136 }

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

◆ pushSurfel()

template<typename TSurfel , typename TEmbedder >
void DGtal::functors::MongeJetFittingGaussianCurvatureEstimator< 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
aDistancedistance of aSurf to the neighborhood boundary

Definition at line 111 of file MongeJetFittingGaussianCurvatureEstimator.h.

113 {
114 BOOST_VERIFY(aDistance==aDistance);
115
116 RealPoint p = myEmbedder->operator()(aSurf);
117 CGALPoint pp(p[0]*myH,p[1]*myH,p[2]*myH);
118 myPoints.push_back(pp);
119 }
Z2i::RealPoint RealPoint

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

◆ reset()

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

Field Documentation

◆ myD

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

◆ myEmbedder

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

◆ myH

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

◆ myPoints

template<typename TSurfel , typename TEmbedder >
std::vector<CGALPoint> DGtal::functors::MongeJetFittingGaussianCurvatureEstimator< TSurfel, TEmbedder >::myPoints
private

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