Loading web-font TeX/Math/Italic
DGtal 2.0.0
DGtal::functors::MongeJetFittingNormalVectorEstimator< TSurfel, TEmbedder > Class Template Reference

Aim: Estimates normal vector using CGAL Jet Fitting and Monge Form. More...

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

Public Types

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

Public Member Functions

 MongeJetFittingNormalVectorEstimator (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.
std::vector< CGALPointmyPoints
 Array of CGAL points.
double myH
unsigned int myD
 Degree of the polynomial surface to fit.

Detailed Description

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

Aim: Estimates normal vector using CGAL Jet Fitting and Monge Form.

Description of template class 'MongeJetFittingNormalVectorEstimator'

As discussed in MongeJetFittingMeanCurvatureEstimator, only the estimated normal vector is given up to a sign. Hence, depending on the local orientation of the surface, you would problably have to reverse the estimated vector \vec{n} to -\vec{n}.

model of concepts::CLocalEstimatorFromSurfelFunctor

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

Definition at line 81 of file MongeJetFittingNormalVectorEstimator.h.

Member Typedef Documentation

◆ CGALKernel

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

Definition at line 90 of file MongeJetFittingNormalVectorEstimator.h.

◆ CGALMongeForm

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

Definition at line 94 of file MongeJetFittingNormalVectorEstimator.h.

◆ CGALMongeViaJet

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

Definition at line 93 of file MongeJetFittingNormalVectorEstimator.h.

◆ CGALPoint

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

Definition at line 91 of file MongeJetFittingNormalVectorEstimator.h.

◆ CGALVector

template<typename TSurfel, typename TEmbedder>
typedef CGALKernel::Vector_3 DGtal::functors::MongeJetFittingNormalVectorEstimator< TSurfel, TEmbedder >::CGALVector

Definition at line 92 of file MongeJetFittingNormalVectorEstimator.h.

◆ Quantity

template<typename TSurfel, typename TEmbedder>
typedef RealPoint DGtal::functors::MongeJetFittingNormalVectorEstimator< TSurfel, TEmbedder >::Quantity

Definition at line 88 of file MongeJetFittingNormalVectorEstimator.h.

◆ RealPoint

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

Definition at line 87 of file MongeJetFittingNormalVectorEstimator.h.

◆ SCellEmbedder

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

Definition at line 86 of file MongeJetFittingNormalVectorEstimator.h.

◆ Surfel

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

Definition at line 85 of file MongeJetFittingNormalVectorEstimator.h.

Constructor & Destructor Documentation

◆ MongeJetFittingNormalVectorEstimator()

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

Constructor.

Parameters
anEmbedderembedder to map surfel to R^n.
hgrid step
ddegree of the polynomial surface to fit (default d=4).

Definition at line 103 of file MongeJetFittingNormalVectorEstimator.h.

104 :
106 {
107 FATAL_ERROR_MSG(d>=2, "Polynomial surface degree must be greater than 2");
108 }
Aim: Estimates normal vector using CGAL Jet Fitting and Monge Form.
const SCellEmbedder * myEmbedder
Alias of the geometrical embedder.
unsigned int myD
Degree of the polynomial surface to fit.

References myD, myEmbedder, and myH.

Member Function Documentation

◆ eval()

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

Evaluate the normal vector from Monge form.

Returns
the mean curvature

Definition at line 131 of file MongeJetFittingNormalVectorEstimator.h.

References myD, and myPoints.

◆ pushSurfel()

template<typename TSurfel, typename TEmbedder>
void DGtal::functors::MongeJetFittingNormalVectorEstimator< 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 116 of file MongeJetFittingNormalVectorEstimator.h.

118 {
120
121 RealPoint p = myEmbedder->operator()(aSurf);
122 CGALPoint pp(p[0]*myH,p[1]*myH,p[2]*myH);
123 myPoints.push_back(pp);
124 }

References myEmbedder, myH, and myPoints.

◆ reset()

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

Reset the point list.

Definition at line 147 of file MongeJetFittingNormalVectorEstimator.h.

148 {
149 myPoints.clear();
150 }

References myPoints.

Field Documentation

◆ myD

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

Degree of the polynomial surface to fit.

Definition at line 165 of file MongeJetFittingNormalVectorEstimator.h.

Referenced by eval(), and MongeJetFittingNormalVectorEstimator().

◆ myEmbedder

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

Alias of the geometrical embedder.

Definition at line 156 of file MongeJetFittingNormalVectorEstimator.h.

Referenced by MongeJetFittingNormalVectorEstimator(), and pushSurfel().

◆ myH

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

◆ myPoints

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

Array of CGAL points.

Definition at line 159 of file MongeJetFittingNormalVectorEstimator.h.

Referenced by eval(), pushSurfel(), and reset().


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