DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode > Class Template Reference

Aim: A class that locally estimates a normal on a digital set using only a predicate "does a point x belong to the digital set or not?". More...

#include <DGtal/geometry/surfaces/estimation/PlaneProbingTetrahedronEstimator.h>

Inheritance diagram for DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >:
[legend]

Public Types

using Self = PlaneProbingTetrahedronEstimator<TPredicate, mode>
 
using Predicate = TPredicate
 
using Point = typename Predicate::Point
 
using Vector = Point
 
using Neighborhood = PlaneProbingNeighborhood<TPredicate>
 
using Triangle = typename Neighborhood::Triangle
 
using Integer = typename Point::Coordinate
 
using PointOnProbingRay = typename Neighborhood::PointOnProbingRay
 
using Permutation = typename PointOnProbingRay::Permutation
 
using Quantity = Vector
 
using HexagonState = typename Neighborhood::HexagonState
 
using UpdateOperation = typename Neighborhood::UpdateOperation
 

Public Member Functions

 PlaneProbingTetrahedronEstimator ()=delete
 
 PlaneProbingTetrahedronEstimator (Point const &aPoint, Triangle const &aM, Predicate const &aPredicate)
 
 ~PlaneProbingTetrahedronEstimator ()
 
 PlaneProbingTetrahedronEstimator (const PlaneProbingTetrahedronEstimator &other)=delete
 
 PlaneProbingTetrahedronEstimator (PlaneProbingTetrahedronEstimator &&other)=delete
 
PlaneProbingTetrahedronEstimatoroperator= (const PlaneProbingTetrahedronEstimator &other)=delete
 
PlaneProbingTetrahedronEstimatoroperator= (PlaneProbingTetrahedronEstimator &&other)=delete
 
Vector const & m (int aIndex) const
 
Point const & q () const
 
Point getOrigin () const
 
Triangle vertices () const
 
std::pair< Vector, VectorgetBasis () const
 
bool isReduced () const
 
Vector getNormal () const
 
std::pair< bool, UpdateOperationadvance (std::vector< PointOnProbingRay > const &aNeighbors)
 
std::pair< bool, UpdateOperationadvance ()
 
Quantity compute (std::vector< PointOnProbingRay > const &aNeighbors)
 
Quantity compute ()
 
HexagonState hexagonState () const
 
void translateQ (Vector const &aTranslation)
 
void translateQ ()
 
void applyOperation (UpdateOperation const &aOp)
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
bool isProjectedInside (Triangle const &aTriangle) const
 
bool isProjectedInside () const
 
bool isInside () const
 
bool isUnimodular () const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< TPredicate >))
 
void update (UpdateOperation const &aOp)
 

Private Attributes

Triangle myM
 
Predicate const & myPredicate
 
Point myS
 
Point myQ
 
NeighborhoodmyNeighborhood = nullptr
 
std::vector< UpdateOperationmyOperations
 

Detailed Description

template<typename TPredicate, ProbingMode mode = ProbingMode::H>
class DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >

Aim: A class that locally estimates a normal on a digital set using only a predicate "does a point x belong to the digital set or not?".

Description of template class 'PlaneProbingTetrahedronEstimator'

Template Parameters
TPredicatethe probing predicate, a model of concepts::CPointPredicate.
modethe probing mode, see DGtal::ProbingMode.
Todo
Add PlaneProbingAlgorithm concept.

Definition at line 106 of file PlaneProbingTetrahedronEstimator.h.

Member Typedef Documentation

◆ HexagonState

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::HexagonState = typename Neighborhood::HexagonState

Definition at line 122 of file PlaneProbingTetrahedronEstimator.h.

◆ Integer

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Integer = typename Point::Coordinate

Definition at line 118 of file PlaneProbingTetrahedronEstimator.h.

◆ Neighborhood

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Neighborhood = PlaneProbingNeighborhood<TPredicate>

Definition at line 116 of file PlaneProbingTetrahedronEstimator.h.

◆ Permutation

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Permutation = typename PointOnProbingRay::Permutation

Definition at line 120 of file PlaneProbingTetrahedronEstimator.h.

◆ Point

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Point = typename Predicate::Point

Definition at line 114 of file PlaneProbingTetrahedronEstimator.h.

◆ PointOnProbingRay

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::PointOnProbingRay = typename Neighborhood::PointOnProbingRay

Definition at line 119 of file PlaneProbingTetrahedronEstimator.h.

◆ Predicate

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Predicate = TPredicate

Definition at line 113 of file PlaneProbingTetrahedronEstimator.h.

◆ Quantity

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Quantity = Vector

Definition at line 121 of file PlaneProbingTetrahedronEstimator.h.

◆ Self

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Self = PlaneProbingTetrahedronEstimator<TPredicate, mode>

Definition at line 112 of file PlaneProbingTetrahedronEstimator.h.

◆ Triangle

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Triangle = typename Neighborhood::Triangle

Definition at line 117 of file PlaneProbingTetrahedronEstimator.h.

◆ UpdateOperation

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::UpdateOperation = typename Neighborhood::UpdateOperation

Definition at line 123 of file PlaneProbingTetrahedronEstimator.h.

◆ Vector

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
using DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::Vector = Point

Definition at line 115 of file PlaneProbingTetrahedronEstimator.h.

Constructor & Destructor Documentation

◆ PlaneProbingTetrahedronEstimator() [1/4]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::PlaneProbingTetrahedronEstimator ( )
delete

Default constructor.

◆ PlaneProbingTetrahedronEstimator() [2/4]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::PlaneProbingTetrahedronEstimator ( Point const & aPoint,
Triangle const & aM,
Predicate const & aPredicate )

Constructs a plane probing tetrahedron estimator from an initial frame and a probing predicate.

Parameters
aPointthe base point of the initial frame.
aMthe three vectors of the initial frame.
aPredicatethe probing predicate.

◆ ~PlaneProbingTetrahedronEstimator()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::~PlaneProbingTetrahedronEstimator ( )

Destructor.

◆ PlaneProbingTetrahedronEstimator() [3/4]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::PlaneProbingTetrahedronEstimator ( const PlaneProbingTetrahedronEstimator< TPredicate, mode > & other)
delete

Copy constructor.

Parameters
otherthe object to clone.

◆ PlaneProbingTetrahedronEstimator() [4/4]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::PlaneProbingTetrahedronEstimator ( PlaneProbingTetrahedronEstimator< TPredicate, mode > && other)
delete

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

◆ advance() [1/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
std::pair< bool, UpdateOperation > DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::advance ( )

Do one step of the estimation.

Returns
false if the algorithm has terminated, true otherwise.

◆ advance() [2/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
std::pair< bool, UpdateOperation > DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::advance ( std::vector< PointOnProbingRay > const & aNeighbors)

Do one step of the estimation, but considering only a subset of candidate rays. Particularly useful on digital surfaces when some directions must be discarded because of 'flat' zones.

Parameters
aNeighborsthe list of candidates ray to consider.
Returns
a pair (op, b) where b = false if the algorithm has terminated, true otherwise; and op is the operation used to update the current tetrahedron.

◆ applyOperation()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
void DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::applyOperation ( UpdateOperation const & aOp)

Applies an operation.

Parameters
aOpthe operation to apply.

◆ BOOST_CONCEPT_ASSERT()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::BOOST_CONCEPT_ASSERT ( (concepts::CPointPredicate< TPredicate >) )
private

◆ compute() [1/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Quantity DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::compute ( )

Estimate the normal using a plane-probing approach, calls advance repeatedly.

Returns
the estimated normal.

◆ compute() [2/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Quantity DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::compute ( std::vector< PointOnProbingRay > const & aNeighbors)

Estimate the normal using a plane-probing approach, calls advance repeatedly.

Parameters
aNeighborsthe list of candidates ray to consider.
Returns
the estimated normal.

Referenced by TEST_CASE().

◆ getBasis()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
std::pair< Vector, Vector > DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::getBasis ( ) const
Returns
the two shortest edges of the triangle that is a basis of the lattice generated by the current estimated normal.

◆ getNormal()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Vector DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::getNormal ( ) const
Returns
the estimated normal.

◆ getOrigin()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Point DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::getOrigin ( ) const
Returns
the point 'p' that is the base point of the tetrahedron.

◆ hexagonState()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
HexagonState DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::hexagonState ( ) const
Returns
the current local configuration, see HexagonState.

◆ isInside()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
bool DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::isInside ( ) const

Checks whether the predicate is true for all vertices of the base triangle or not.

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

◆ isProjectedInside() [1/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
bool DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::isProjectedInside ( ) const

Tests whether the fixed point 'q' projects into the base, along the current estimated normal.

◆ isProjectedInside() [2/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
bool DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::isProjectedInside ( Triangle const & aTriangle) const

Tests whether the fixed point 'q' projects the given triangle, along the current estimated normal.

Parameters
aTrianglethe 3 points of the triangle.

◆ isReduced()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
bool DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::isReduced ( ) const
Returns
'true' if the current basis is reduced or not, 'false' otherwise.

Referenced by TEST_CASE().

◆ isUnimodular()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
bool DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::isUnimodular ( ) const

Checks whether the three vectors stored in 'myM' are the columns of a unimodular matrix or not.

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

◆ isValid()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
bool DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::isValid ( ) const

Checks the validity/consistency of the object.

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

◆ m()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Vector const & DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::m ( int aIndex) const
Parameters
aIndexthe index of the vector (between 0 and 2).
Returns
the i-th height vector \( m_i \).

◆ operator=() [1/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
PlaneProbingTetrahedronEstimator & DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::operator= ( const PlaneProbingTetrahedronEstimator< TPredicate, mode > & other)
delete

Copy assignment operator.

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

◆ operator=() [2/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
PlaneProbingTetrahedronEstimator & DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::operator= ( PlaneProbingTetrahedronEstimator< TPredicate, mode > && other)
delete

Move assignment operator.

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

◆ q()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Point const & DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::q ( ) const
Returns
the fixed point \( q \).

◆ selfDisplay()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
void DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::selfDisplay ( std::ostream & out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ translateQ() [1/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
void DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::translateQ ( )

Translates the fixed point \( q \), this is used by the parallelepiped version of the estimator, see PlaneProbingParallelepipedEstimator.

◆ translateQ() [2/2]

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
void DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::translateQ ( Vector const & aTranslation)

Translates the fixed point \( q \) by a given vector.

Parameters
aTranslationa translation vector.

◆ update()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
void DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::update ( UpdateOperation const & aOp)
private

Updates one height vector.

Parameters
aOpoperation describing the update step.

◆ vertices()

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Triangle DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::vertices ( ) const
Returns
the three vertices of the base of the tetrahedron.

Field Documentation

◆ myM

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Triangle DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::myM
private

The three height vectors, representing the current frame.

Definition at line 309 of file PlaneProbingTetrahedronEstimator.h.

◆ myNeighborhood

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Neighborhood* DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::myNeighborhood = nullptr
private

Describes what kind of probing method is used.

Definition at line 313 of file PlaneProbingTetrahedronEstimator.h.

◆ myOperations

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
std::vector<UpdateOperation> DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::myOperations
private

The list of all operations.

Definition at line 314 of file PlaneProbingTetrahedronEstimator.h.

◆ myPredicate

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Predicate const& DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::myPredicate
private

The probing predicate.

Definition at line 310 of file PlaneProbingTetrahedronEstimator.h.

◆ myQ

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Point DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::myQ
private

The fixed point 'q'.

Definition at line 312 of file PlaneProbingTetrahedronEstimator.h.

◆ myS

template<typename TPredicate , ProbingMode mode = ProbingMode::H>
Point DGtal::PlaneProbingTetrahedronEstimator< TPredicate, mode >::myS
private

The shift vector.

Definition at line 311 of file PlaneProbingTetrahedronEstimator.h.


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