DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::DigitalSurfaceRegularization< TDigitalSurface > Class Template Reference

Aim: Implements Digital Surface Regularization as described in [31]. More...

#include <DGtal/geometry/surfaces/DigitalSurfaceRegularization.h>

Public Types

typedef TDigitalSurface DigSurface
 DigitalSurface type.
 
typedef TDigitalSurface::DigitalSurfaceContainer DigitalSurfaceContainer
 Digital Surface Container type.
 
typedef Shortcuts< Z3i::KSpaceSH3
 We rely on the Shortcuts 3D types.
 
typedef ShortcutsGeometry< Z3i::KSpaceSHG3
 We rely on the ShortcutsGeometry 3D types.
 
typedef std::vector< Z3i::RealPointPositions
 Pointels position container.
 
typedef std::vector< Z3i::RealVectorNormals
 Pointels position container.
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer >))
 
 DigitalSurfaceRegularization (CountedPtr< DigSurface > aDigSurf)
 
 ~DigitalSurfaceRegularization ()=default
 
 DigitalSurfaceRegularization (const DigitalSurfaceRegularization &other)=delete
 
 DigitalSurfaceRegularization (DigitalSurfaceRegularization &&other)=delete
 
DigitalSurfaceRegularizationoperator= (const DigitalSurfaceRegularization &other)=delete
 
DigitalSurfaceRegularizationoperator= (DigitalSurfaceRegularization &&other)=delete
 
void attachNormalVectors (const std::function< SHG3::RealVector(SH3::SCell &)> &normalFunc)
 
void attachConvolvedTrivialNormalVectors (const Parameters someParams=SH3::defaultParameters()|SHG3::defaultParameters())
 
void init (const double alpha=0.001, const double beta=1.0, const double gamma=0.05)
 Initialize the parameters of the energy function.
 
void init (ConstAlias< std::vector< double > > alphas, ConstAlias< std::vector< double > > betas, ConstAlias< std::vector< double > > gammas)
 Initialize the parameters of the energy function.
 
double computeGradient ()
 
double computeGradientLocalWeights ()
 
template<typename AdvectionFunction >
double regularize (const unsigned int nbIters, const double dt, const double epsilon, const AdvectionFunction &advectionFunc)
 Main regularization loop.
 
double regularize (const unsigned int nbIters=200, const double dt=1.0, const double epsilon=0.0001)
 Main regularization loop.
 
SHG3::RealPoint getRegularizedPosition (const SH3::Cell &aPointel)
 
const PositionsgetRegularizedPositions () const
 
const PositionsgetOriginalPositions () const
 
const SH3::Cell2IndexgetCellIndex () const
 
const NormalsgetNormalVectors () const
 
const SH3::Surfel2IndexgetSurfelIndex () const
 
void reset ()
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
void enableVerbose ()
 
void disasbleVerbose ()
 

Static Public Member Functions

static void clampedAdvection (SHG3::RealPoint &p, const SHG3::RealPoint &orig, const SHG3::RealVector &v)
 

Private Member Functions

void cacheInit ()
 

Private Attributes

double myAlpha
 Data attachment term coefficient.
 
double myBeta
 Alignment term coefficient.
 
double myGamma
 Fairness term coefficient.
 
const std::vector< double > * myAlphas
 Data attachment term local coefficients.
 
const std::vector< double > * myBetas
 Alignment attachment term local coefficients.
 
const std::vector< double > * myGammas
 Fairness attachment term local coefficients.
 
bool myConstantCoeffs
 Flag if the gradient has constant weights for the init method and gradient.
 
bool myInit
 Flag if the object has been set up properly.
 
bool myVerbose
 Flag for verbose messages.
 
CountedPtr< DigSurfacemyDigitalSurface
 Input DigitalSurface to regularize.
 
Positions myOriginalPositions
 Copy of the input pointels positions.
 
Positions myRegularizedPositions
 Regularized vertices.
 
Normals myNormals
 Normals.
 
Positions myGradient
 Gradient of the energy w.r.t. vertex positons.
 
Positions myGradientAlign
 Internal members to store precomputed topological informations.
 
SH3::KSpace myK
 Instance of the KSpace.
 
SH3::SurfelRange mySurfels
 Indexed surface elements.
 
SH3::Surfel2Index mySurfelIndex
 Surfel Index.
 
SH3::Cell2Index myPointelIndex
 Indices for pointels.
 
std::vector< SH3::IdxmyAlignPointelsIdx
 Indices of adjacent pointels for the Alignement energy term.
 
std::vector< SH3::CellmyAlignPointels
 Adjacent pointels for the Alignement energy term.
 
std::vector< unsigned char > myNumberAdjEdgesToPointel
 Number of adjacent edges to pointels.
 
std::vector< SH3::IdxmyFairnessPointelsIdx
 Indices of cells foor the Fairness term.
 
std::vector< unsigned char > myNbAdjacent
 Number of adjacent faces to given vertex.
 
SH3::PolygonalSurface::FaceRange myFaces
 All faces of the dual digital surfacce.
 

Detailed Description

template<typename TDigitalSurface>
class DGtal::DigitalSurfaceRegularization< TDigitalSurface >

Aim: Implements Digital Surface Regularization as described in [31].

Description of template class 'DigitalSurfaceRegularization'

Given a digital surface and a normal vector field attached to the surfels, this class performs a regularization of the digital surface vertices to obtain a piecewise smooth surface such that each quad of the output surface is as perpendicular as possible to the given input normal vector field.

Note
The digital surface must be a closed.

If \(P\) denotes the vertices of the input digital surface, \(F\) the set of (quadrilateral) faces and \(n_f\) an estimated normal vector on the face \(f\), we want the quad surface vertex positions \(P^*\) that minimizes the following energy function:

\[\mathcal{E}(P) := \alpha \sum_{i=1}^{n} \|p_i - \hat{p}_i\|^2 + \beta \sum_{f\in F} \sum_{{e_j} \in \partial{f} } ( e_j \cdot n_{f} )^2 + \gamma \sum_{i=1}^{n} \|\hat{p}_i - \hat{b}_i\|^2\,.\]

where \("\cdot"\) is the standard \(\mathbb{R}^3\) scalar product, \(e_j\in \partial{f}\) is an edge of the face \(f\) (and is equal to some \(p_k - p_l\)) and \( \hat{b}_i\) is the barycenter of the vertices adjacent to \(\hat{p}_i\).

To minimize this energy, instead of solving the associated sparse linear system as described in [31], we perform a gradient descent strategy which allows us a finer control over the vertices displacement (see advection methods).

See also
testDigitalSurfaceRegularization.cpp
Template Parameters
TDigitalSurfacea Digital Surface type (see DigitalSurface).

Definition at line 88 of file DigitalSurfaceRegularization.h.

Member Typedef Documentation

◆ DigitalSurfaceContainer

template<typename TDigitalSurface >
typedef TDigitalSurface::DigitalSurfaceContainer DGtal::DigitalSurfaceRegularization< TDigitalSurface >::DigitalSurfaceContainer

Digital Surface Container type.

Definition at line 96 of file DigitalSurfaceRegularization.h.

◆ DigSurface

template<typename TDigitalSurface >
typedef TDigitalSurface DGtal::DigitalSurfaceRegularization< TDigitalSurface >::DigSurface

DigitalSurface type.

Definition at line 94 of file DigitalSurfaceRegularization.h.

◆ Normals

template<typename TDigitalSurface >
typedef std::vector<Z3i::RealVector> DGtal::DigitalSurfaceRegularization< TDigitalSurface >::Normals

Pointels position container.

Definition at line 109 of file DigitalSurfaceRegularization.h.

◆ Positions

template<typename TDigitalSurface >
typedef std::vector<Z3i::RealPoint> DGtal::DigitalSurfaceRegularization< TDigitalSurface >::Positions

Pointels position container.

Definition at line 106 of file DigitalSurfaceRegularization.h.

◆ SH3

template<typename TDigitalSurface >
typedef Shortcuts<Z3i::KSpace> DGtal::DigitalSurfaceRegularization< TDigitalSurface >::SH3

We rely on the Shortcuts 3D types.

Definition at line 100 of file DigitalSurfaceRegularization.h.

◆ SHG3

template<typename TDigitalSurface >
typedef ShortcutsGeometry<Z3i::KSpace> DGtal::DigitalSurfaceRegularization< TDigitalSurface >::SHG3

We rely on the ShortcutsGeometry 3D types.

Definition at line 103 of file DigitalSurfaceRegularization.h.

Constructor & Destructor Documentation

◆ DigitalSurfaceRegularization() [1/3]

template<typename TDigitalSurface >
DGtal::DigitalSurfaceRegularization< TDigitalSurface >::DigitalSurfaceRegularization ( CountedPtr< DigSurface > aDigSurf)
inline

Default constructor.

Definition at line 114 of file DigitalSurfaceRegularization.h.

115 : myInit(false), myVerbose(false), myDigitalSurface(aDigSurf)
116 {
118 }
CountedPtr< DigSurface > myDigitalSurface
Input DigitalSurface to regularize.
bool myInit
Flag if the object has been set up properly.
static KSpace getKSpace(const Point &low, const Point &up, Parameters params=parametersKSpace())
Definition Shortcuts.h:332

References DGtal::Shortcuts< TKSpace >::getKSpace(), DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myDigitalSurface, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myK.

◆ ~DigitalSurfaceRegularization()

template<typename TDigitalSurface >
DGtal::DigitalSurfaceRegularization< TDigitalSurface >::~DigitalSurfaceRegularization ( )
default

Destructor.

◆ DigitalSurfaceRegularization() [2/3]

template<typename TDigitalSurface >
DGtal::DigitalSurfaceRegularization< TDigitalSurface >::DigitalSurfaceRegularization ( const DigitalSurfaceRegularization< TDigitalSurface > & other)
delete

Copy constructor.

Parameters
otherthe object to clone.

◆ DigitalSurfaceRegularization() [3/3]

template<typename TDigitalSurface >
DGtal::DigitalSurfaceRegularization< TDigitalSurface >::DigitalSurfaceRegularization ( DigitalSurfaceRegularization< TDigitalSurface > && other)
delete

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

◆ attachConvolvedTrivialNormalVectors()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::attachConvolvedTrivialNormalVectors ( const Parameters someParams = SH3::defaultParameters()|SHG3::defaultParameters())

Attach convolved trivial normal vectors to the digital surface (cf ShortCutsGeometry::getCTrivialNormalVectors).

An important parameter is the radius used to estimate the normal vectors (t-ring, default=3.0).

Parameters
someParamsthe parameters (t-ring, default=3.0 used in the local convolution).

Referenced by main(), and TEST_CASE().

◆ attachNormalVectors()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::attachNormalVectors ( const std::function< SHG3::RealVector(SH3::SCell &)> & normalFunc)

Attach normal vectors from a generic function that associates a normal vector to each surfel.

Parameters
normalFunca function (or a lambda, or a functor) that maps surfels (SH3::SCell) to normal vectors (SH3::RealVector).

Referenced by TEST_CASE().

◆ BOOST_CONCEPT_ASSERT()

template<typename TDigitalSurface >
DGtal::DigitalSurfaceRegularization< TDigitalSurface >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer >) )

◆ cacheInit()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::cacheInit ( )
private

Internal init method to set up topological caches.

◆ clampedAdvection()

template<typename TDigitalSurface >
static void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::clampedAdvection ( SHG3::RealPoint & p,
const SHG3::RealPoint & orig,
const SHG3::RealVector & v )
inlinestatic

Static method to be used in regularize() that clamps to regularized point p when shifted by v in the unit cube centered at orig.

Parameters
[in,out]pthe point to advect.
[in]origthe associated point in the original surface.
[in]vthe advection vector.

Definition at line 292 of file DigitalSurfaceRegularization.h.

295 {
296 p += v;
297 for(auto i=0; i < 3; ++i)
298 if ((p[i]-orig[i])> 0.5) p[i]=orig[i]+0.5;
299 else
300 if ((p[i]-orig[i])< -0.5) p[i]=orig[i]-0.5;
301 }

◆ computeGradient()

template<typename TDigitalSurface >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::computeGradient ( )

Compute the energy gradient vector and return the energy value.

Note
init() method must have been called and normal vectors must be have been attached to the surfels.
Returns
the energy value.

Referenced by TEST_CASE().

◆ computeGradientLocalWeights()

template<typename TDigitalSurface >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::computeGradientLocalWeights ( )

Compute the energy gradient vector and return the energy value.

This method assumes that you have local alpha, beta and gamma weights.

Note
init(alphas,betas,gammas) method must have been called and normal vectors must have been attached to the surfels.
Returns
the energy value.

◆ disasbleVerbose()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::disasbleVerbose ( )
inline

Disable verbose messages.

Definition at line 404 of file DigitalSurfaceRegularization.h.

404{myVerbose=false;}

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myVerbose.

◆ enableVerbose()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::enableVerbose ( )
inline

Enable verbose messages.

Definition at line 399 of file DigitalSurfaceRegularization.h.

399{myVerbose=true;}

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myVerbose.

◆ getCellIndex()

template<typename TDigitalSurface >
const SH3::Cell2Index & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getCellIndex ( ) const
inline
Returns
the CellIndex (Cell->Index map) for the positions and normal vectors containers.
Note
the init() method must have been called.

Definition at line 343 of file DigitalSurfaceRegularization.h.

344 {
345 ASSERT_MSG(myInit, "The init() method must be called first.");
346 return myPointelIndex;
347 }
SH3::Cell2Index myPointelIndex
Indices for pointels.

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myPointelIndex.

Referenced by TEST_CASE().

◆ getNormalVectors()

template<typename TDigitalSurface >
const Normals & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getNormalVectors ( ) const
inline
Returns
the input normal vectors (see getSurfelIndex for the Cell->Index map).
Note
the init() method must have been called.

Definition at line 353 of file DigitalSurfaceRegularization.h.

354 {
355 ASSERT_MSG(myInit, "The init() method must be called first.");
356 return myNormals;
357 }

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myNormals.

Referenced by TEST_CASE().

◆ getOriginalPositions()

template<typename TDigitalSurface >
const Positions & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getOriginalPositions ( ) const
inline
Returns
the input vertices positions (see getCellIndex for the Cell->Index map).
Note
the init() method must have been called.

Definition at line 333 of file DigitalSurfaceRegularization.h.

334 {
335 ASSERT_MSG(myInit, "The init() method must be called first.");
336 return myOriginalPositions;
337 }
Positions myOriginalPositions
Copy of the input pointels positions.

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myOriginalPositions.

Referenced by TEST_CASE().

◆ getRegularizedPosition()

template<typename TDigitalSurface >
SHG3::RealPoint DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getRegularizedPosition ( const SH3::Cell & aPointel)
inline
Returns
the regularized position of a given pointel aPointel.
Parameters
[in]aPointelthe digital surface pointel.
Note
the init() method must have been called. For relevant results, the regularize() methods should have been also called before accessing the new positions.

Definition at line 311 of file DigitalSurfaceRegularization.h.

312 {
313 ASSERT_MSG(myInit, "The init() method must be called first.");
314 ASSERT_MSG(myK.uDim(aPointel) == 0, "The cell must be a pointel (0-cell)");
315 return myRegularizedPositions[ myPointelIndex[ aPointel] ];
316 }
Positions myRegularizedPositions
Regularized vertices.

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myK, DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myPointelIndex, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myRegularizedPositions.

Referenced by TEST_CASE().

◆ getRegularizedPositions()

template<typename TDigitalSurface >
const Positions & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getRegularizedPositions ( ) const
inline
Returns
the regularized vertices positions (see getCellIndex for the Cell->Index map).
Note
the init() method must have been called.

Definition at line 323 of file DigitalSurfaceRegularization.h.

324 {
325 ASSERT_MSG(myInit, "The init() method must be called first.");
327 }

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myRegularizedPositions.

Referenced by main(), and TEST_CASE().

◆ getSurfelIndex()

template<typename TDigitalSurface >
const SH3::Surfel2Index & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::getSurfelIndex ( ) const
inline
Returns
the CellIndex (Cell->Index map) for the positions and normal vectors containers.
Note
the init() method must have been called.

Definition at line 364 of file DigitalSurfaceRegularization.h.

365 {
366 ASSERT_MSG(myInit, "The init() method must be called first.");
367 return mySurfelIndex;
368 }

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::mySurfelIndex.

Referenced by TEST_CASE().

◆ init() [1/2]

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::init ( const double alpha = 0.001,
const double beta = 1.0,
const double gamma = 0.05 )

Initialize the parameters of the energy function.

This init() method attaches the same weights to all vertices.

Parameters
[in]alphathe data attachment term coeff. (default=0.001)
[in]betathe alignemnt term coeff. (default=1.0)
[in]gammathe fairness term coeef. (default=0.05)

Referenced by main(), and TEST_CASE().

◆ init() [2/2]

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::init ( ConstAlias< std::vector< double > > alphas,
ConstAlias< std::vector< double > > betas,
ConstAlias< std::vector< double > > gammas )

Initialize the parameters of the energy function.

This init() method considers local weights per vertex (all verctors must have the same size: the number of pointels of the original surface).

Parameters
[in]alphasthe data attachment term coeff.
[in]betasthe alignemnt term coeff.
[in]gammasthe fairness term coeef.

◆ isValid()

template<typename TDigitalSurface >
bool DGtal::DigitalSurfaceRegularization< TDigitalSurface >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

Referenced by TEST_CASE().

◆ operator=() [1/2]

template<typename TDigitalSurface >
DigitalSurfaceRegularization & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::operator= ( const DigitalSurfaceRegularization< TDigitalSurface > & other)
delete

Copy assignment operator.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ operator=() [2/2]

template<typename TDigitalSurface >
DigitalSurfaceRegularization & DGtal::DigitalSurfaceRegularization< TDigitalSurface >::operator= ( DigitalSurfaceRegularization< TDigitalSurface > && other)
delete

Move assignment operator.

Parameters
otherthe object to move.
Returns
a reference on 'this'.

◆ regularize() [1/2]

template<typename TDigitalSurface >
template<typename AdvectionFunction >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::regularize ( const unsigned int nbIters,
const double dt,
const double epsilon,
const AdvectionFunction & advectionFunc )

Main regularization loop.

This method performs the main minimization loop of the energy using a gradient descent scheme (with automatic update of the learning step). The iterative process stops either when the number of steps reaches nbIters, or when the \(l_\infty\) norm of the energy gradient is below epsilon.

The last parameter is a function that describes how regularized points are advected during the gradient descent. By default, points are shifted by a fraction of the energy gradient vector (and the default function is thus \( p \leftarrow p + v\) with \( v = -dt \nabla E_p\)). See

See also
clampedAdvection for another advection strategy.

The energy at the final step is returned.

Parameters
[in]nbItersmaxium number of steps
[in]dtinitial learning rate
[in]epsilonminimum l_infity norm of the gradient vector
[in]advectionFuncadvection function/functor/lambda to move a regularized point &a p associated with the original point o w.r.t to a displacement vector v (default = p+v)
Template Parameters
AdvectionFunctiontype of advection function, functor or lambda (RealPoint, RealPoint, RealVector)->RealPoint.
Returns
the energy at the final step.

Referenced by main(), DGtal::DigitalSurfaceRegularization< TDigitalSurface >::regularize(), and TEST_CASE().

◆ regularize() [2/2]

template<typename TDigitalSurface >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::regularize ( const unsigned int nbIters = 200,
const double dt = 1.0,
const double epsilon = 0.0001 )
inline

Main regularization loop.

This method performs the main minimization loop of the energy using a gradient descent scheme (with automatic update of the learning step). The iterative process stops either when the number of steps reaches nbIters, or when the \(l_\infty\) norm of the energy gradient is below epsilon.

This methods uses the default advection function \( p = p + v\).

The energy at the final step is returned.

Parameters
[in]nbItersmaxium number of steps (default=200)
[in]dtinitial learning rate (default = 1.0)
[in]epsilonminimum l_infity norm of the gradient vector (default = 0.0001)
Returns
the energy at the final step.

Definition at line 273 of file DigitalSurfaceRegularization.h.

276 {
277 return regularize(nbIters,dt,epsilon,
278 [](SHG3::RealPoint& p,SHG3::RealPoint& o,SHG3::RealVector& v){ (void)o; p += v; });
279 }
double regularize(const unsigned int nbIters, const double dt, const double epsilon, const AdvectionFunction &advectionFunc)
Main regularization loop.
Aim: Implements basic operations that will be used in Point and Vector classes.

References dt, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::regularize().

◆ reset()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::reset ( )
inline

Reset the regularized vertices positions to the original one.

Note
the init() method must have been called.

Definition at line 374 of file DigitalSurfaceRegularization.h.

375 {
376 ASSERT_MSG(myInit, "The init() method must be called first.");
377 std::copy(myOriginalPositions.begin(), myOriginalPositions.end(), myRegularizedPositions.begin());
378 }

References DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myInit, DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myOriginalPositions, and DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myRegularizedPositions.

Referenced by TEST_CASE().

◆ selfDisplay()

template<typename TDigitalSurface >
void DGtal::DigitalSurfaceRegularization< TDigitalSurface >::selfDisplay ( std::ostream & out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myAlignPointels

template<typename TDigitalSurface >
std::vector< SH3::Cell > DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myAlignPointels
private

Adjacent pointels for the Alignement energy term.

Definition at line 479 of file DigitalSurfaceRegularization.h.

◆ myAlignPointelsIdx

template<typename TDigitalSurface >
std::vector< SH3::Idx > DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myAlignPointelsIdx
private

Indices of adjacent pointels for the Alignement energy term.

Definition at line 477 of file DigitalSurfaceRegularization.h.

◆ myAlpha

template<typename TDigitalSurface >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myAlpha
private

Data attachment term coefficient.

Definition at line 419 of file DigitalSurfaceRegularization.h.

◆ myAlphas

template<typename TDigitalSurface >
const std::vector<double>* DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myAlphas
private

Data attachment term local coefficients.

Definition at line 426 of file DigitalSurfaceRegularization.h.

◆ myBeta

template<typename TDigitalSurface >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myBeta
private

Alignment term coefficient.

Definition at line 421 of file DigitalSurfaceRegularization.h.

◆ myBetas

template<typename TDigitalSurface >
const std::vector<double>* DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myBetas
private

Alignment attachment term local coefficients.

Definition at line 428 of file DigitalSurfaceRegularization.h.

◆ myConstantCoeffs

template<typename TDigitalSurface >
bool DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myConstantCoeffs
private

Flag if the gradient has constant weights for the init method and gradient.

Definition at line 433 of file DigitalSurfaceRegularization.h.

◆ myDigitalSurface

template<typename TDigitalSurface >
CountedPtr<DigSurface> DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myDigitalSurface
private

◆ myFaces

template<typename TDigitalSurface >
SH3::PolygonalSurface::FaceRange DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myFaces
private

All faces of the dual digital surfacce.

Definition at line 487 of file DigitalSurfaceRegularization.h.

◆ myFairnessPointelsIdx

template<typename TDigitalSurface >
std::vector< SH3::Idx > DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myFairnessPointelsIdx
private

Indices of cells foor the Fairness term.

Definition at line 483 of file DigitalSurfaceRegularization.h.

◆ myGamma

template<typename TDigitalSurface >
double DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myGamma
private

Fairness term coefficient.

Definition at line 423 of file DigitalSurfaceRegularization.h.

◆ myGammas

template<typename TDigitalSurface >
const std::vector<double>* DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myGammas
private

Fairness attachment term local coefficients.

Definition at line 430 of file DigitalSurfaceRegularization.h.

◆ myGradient

template<typename TDigitalSurface >
Positions DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myGradient
private

Gradient of the energy w.r.t. vertex positons.

Definition at line 454 of file DigitalSurfaceRegularization.h.

◆ myGradientAlign

template<typename TDigitalSurface >
Positions DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myGradientAlign
private

Internal members to store precomputed topological informations.

Gradient of the quad alignement w.r.t. vertex positons

Definition at line 462 of file DigitalSurfaceRegularization.h.

◆ myInit

◆ myK

◆ myNbAdjacent

template<typename TDigitalSurface >
std::vector< unsigned char > DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myNbAdjacent
private

Number of adjacent faces to given vertex.

Definition at line 485 of file DigitalSurfaceRegularization.h.

◆ myNormals

template<typename TDigitalSurface >
Normals DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myNormals
private

◆ myNumberAdjEdgesToPointel

template<typename TDigitalSurface >
std::vector<unsigned char> DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myNumberAdjEdgesToPointel
private

Number of adjacent edges to pointels.

Definition at line 481 of file DigitalSurfaceRegularization.h.

◆ myOriginalPositions

template<typename TDigitalSurface >
Positions DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myOriginalPositions
private

◆ myPointelIndex

template<typename TDigitalSurface >
SH3::Cell2Index DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myPointelIndex
private

◆ myRegularizedPositions

◆ mySurfelIndex

template<typename TDigitalSurface >
SH3::Surfel2Index DGtal::DigitalSurfaceRegularization< TDigitalSurface >::mySurfelIndex
private

◆ mySurfels

template<typename TDigitalSurface >
SH3::SurfelRange DGtal::DigitalSurfaceRegularization< TDigitalSurface >::mySurfels
private

Indexed surface elements.

Definition at line 468 of file DigitalSurfaceRegularization.h.

◆ myVerbose

template<typename TDigitalSurface >
bool DGtal::DigitalSurfaceRegularization< TDigitalSurface >::myVerbose
private

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