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

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

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

Public Types

typedef TSurfel Surfel
 
typedef TEmbedder SCellEmbedder
 
typedef std::pair< double, 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

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

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

Description of template class 'MongeJetFittingPrincipalCurvaturesEstimator'

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 MongeJetFittingPrincipalCurvaturesEstimator.h.

Member Typedef Documentation

◆ CGALKernel

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

◆ CGALMongeForm

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

◆ CGALMongeViaJet

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

◆ CGALPoint

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

◆ Quantity

template<typename TSurfel , typename TEmbedder >
typedef std::pair<double, double> DGtal::functors::MongeJetFittingPrincipalCurvaturesEstimator< TSurfel, TEmbedder >::Quantity

◆ RealPoint

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

◆ SCellEmbedder

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

◆ Surfel

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

Constructor & Destructor Documentation

◆ MongeJetFittingPrincipalCurvaturesEstimator()

template<typename TSurfel , typename TEmbedder >
DGtal::functors::MongeJetFittingPrincipalCurvaturesEstimator< TSurfel, TEmbedder >::MongeJetFittingPrincipalCurvaturesEstimator ( 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 99 of file MongeJetFittingPrincipalCurvaturesEstimator.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 }

Member Function Documentation

◆ eval()

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

Evaluate the curvature from Monge form.

Returns
the mean curvature

Definition at line 126 of file MongeJetFittingPrincipalCurvaturesEstimator.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 Quantity result;
136 result.first = k1;
137 result.second = k2;
138 return result;
139 }

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

◆ pushSurfel()

template<typename TSurfel , typename TEmbedder >
void DGtal::functors::MongeJetFittingPrincipalCurvaturesEstimator< 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 MongeJetFittingPrincipalCurvaturesEstimator.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::MongeJetFittingPrincipalCurvaturesEstimator< TSurfel, TEmbedder >::myEmbedder, DGtal::functors::MongeJetFittingPrincipalCurvaturesEstimator< TSurfel, TEmbedder >::myH, and DGtal::functors::MongeJetFittingPrincipalCurvaturesEstimator< TSurfel, TEmbedder >::myPoints.

◆ reset()

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

Field Documentation

◆ myD

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

◆ myEmbedder

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

◆ myH

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

◆ myPoints

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

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