DGtal 1.3.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode > Class Template Reference

Aim: More...

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

Data Structures

class  NotAbovePredicate
 

Public Types

using Self = PlaneProbingParallelepipedEstimator< TPredicate, mode >
 
using Predicate = TPredicate
 
using Point = typename Predicate::Point
 
using Vector = Point
 
using Integer = typename Predicate::Integer
 
using TetrahedronEstimator = PlaneProbingTetrahedronEstimator< NotAbovePredicate, mode >
 
using Triangle = typename TetrahedronEstimator::Triangle
 
using PointOnProbingRay = typename TetrahedronEstimator::PointOnProbingRay
 
using Quantity = typename TetrahedronEstimator::Quantity
 
using UpdateOperation = typename TetrahedronEstimator::UpdateOperation
 
using HexagonState = typename TetrahedronEstimator::HexagonState
 

Public Member Functions

 PlaneProbingParallelepipedEstimator ()=delete
 
 PlaneProbingParallelepipedEstimator (Point const &aPoint, Triangle const &aM, Predicate const &aPredicate, Integer const &aBound)
 
 ~PlaneProbingParallelepipedEstimator ()=default
 
 PlaneProbingParallelepipedEstimator (const PlaneProbingParallelepipedEstimator &other)=delete
 
 PlaneProbingParallelepipedEstimator (PlaneProbingParallelepipedEstimator &&other)=delete
 
PlaneProbingParallelepipedEstimatoroperator= (const PlaneProbingParallelepipedEstimator &other)=delete
 
PlaneProbingParallelepipedEstimatoroperator= (PlaneProbingParallelepipedEstimator &&other)=delete
 
Vector m (int aIndex) const
 
Point q () const
 
Point getOrigin () const
 
int getState () const
 
bool isSeparating () const
 
bool advance (std::vector< PointOnProbingRay > const &aNeighbors)
 
bool advance ()
 
Quantity compute (std::vector< PointOnProbingRay > const &aNeighbors)
 
Quantity compute ()
 
HexagonState hexagonState () const
 
Vector getNormal () const
 
std::pair< Vector, VectorgetBasis () const
 
bool isReduced () const
 
bool isInReverseState () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< TPredicate >))
 
std::vector< UpdateOperationgeometricalDecomposition (UpdateOperation const &aOp) const
 
bool translateIf (UpdateOperation const &aOp)
 
bool inPlane (Point const &aPoint) const
 

Private Attributes

NotAbovePredicate myNotAbovePredicate
 
TetrahedronEstimator myTetrahedronEstimator
 
bool myIsInReverseState
 

Detailed Description

template<typename TPredicate, ProbingMode mode>
class DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >

Aim:

Description of template class 'PlaneProbingParallelepipedEstimator'

Template Parameters
TPredicatethe probing predicate, a model of concepts::CPointPredicate.

Definition at line 62 of file PlaneProbingParallelepipedEstimator.h.

Member Typedef Documentation

◆ HexagonState

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::HexagonState = typename TetrahedronEstimator::HexagonState

Definition at line 79 of file PlaneProbingParallelepipedEstimator.h.

◆ Integer

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::Integer = typename Predicate::Integer

Definition at line 73 of file PlaneProbingParallelepipedEstimator.h.

◆ Point

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

Definition at line 71 of file PlaneProbingParallelepipedEstimator.h.

◆ PointOnProbingRay

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::PointOnProbingRay = typename TetrahedronEstimator::PointOnProbingRay

Definition at line 76 of file PlaneProbingParallelepipedEstimator.h.

◆ Predicate

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

Definition at line 70 of file PlaneProbingParallelepipedEstimator.h.

◆ Quantity

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::Quantity = typename TetrahedronEstimator::Quantity

Definition at line 77 of file PlaneProbingParallelepipedEstimator.h.

◆ Self

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

Definition at line 69 of file PlaneProbingParallelepipedEstimator.h.

◆ TetrahedronEstimator

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::TetrahedronEstimator = PlaneProbingTetrahedronEstimator<NotAbovePredicate, mode>

Definition at line 74 of file PlaneProbingParallelepipedEstimator.h.

◆ Triangle

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::Triangle = typename TetrahedronEstimator::Triangle

Definition at line 75 of file PlaneProbingParallelepipedEstimator.h.

◆ UpdateOperation

template<typename TPredicate , ProbingMode mode>
using DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::UpdateOperation = typename TetrahedronEstimator::UpdateOperation

Definition at line 78 of file PlaneProbingParallelepipedEstimator.h.

◆ Vector

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

Definition at line 72 of file PlaneProbingParallelepipedEstimator.h.

Constructor & Destructor Documentation

◆ PlaneProbingParallelepipedEstimator() [1/4]

template<typename TPredicate , ProbingMode mode>
DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::PlaneProbingParallelepipedEstimator ( )
delete

Default constructor.

◆ PlaneProbingParallelepipedEstimator() [2/4]

template<typename TPredicate , ProbingMode mode>
DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::PlaneProbingParallelepipedEstimator ( Point const &  aPoint,
Triangle const &  aM,
Predicate const &  aPredicate,
Integer const &  aBound 
)

Constructs a plane probing parallelepiped 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.
aBoundthe bound used in the NotAbove predicate.

◆ ~PlaneProbingParallelepipedEstimator()

template<typename TPredicate , ProbingMode mode>
DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::~PlaneProbingParallelepipedEstimator ( )
default

Destructor.

◆ PlaneProbingParallelepipedEstimator() [3/4]

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

Copy constructor.

Parameters
otherthe object to clone.

◆ PlaneProbingParallelepipedEstimator() [4/4]

template<typename TPredicate , ProbingMode mode>
DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::PlaneProbingParallelepipedEstimator ( PlaneProbingParallelepipedEstimator< TPredicate, mode > &&  other)
delete

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

◆ advance() [1/2]

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< 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>
bool DGtal::PlaneProbingParallelepipedEstimator< 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
false if the algorithm has terminated, true otherwise.

Referenced by main().

◆ BOOST_CONCEPT_ASSERT()

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

◆ compute() [1/2]

template<typename TPredicate , ProbingMode mode>
Quantity DGtal::PlaneProbingParallelepipedEstimator< 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>
Quantity DGtal::PlaneProbingParallelepipedEstimator< 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().

◆ geometricalDecomposition()

template<typename TPredicate , ProbingMode mode>
std::vector< UpdateOperation > DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::geometricalDecomposition ( UpdateOperation const &  aOp) const
private

Decompose a non-elementary operations into an array of elementary ones.

Returns
a list of elementary operations.

◆ getBasis()

template<typename TPredicate , ProbingMode mode>
std::pair< Vector, Vector > DGtal::PlaneProbingParallelepipedEstimator< 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>
Vector DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::getNormal ( ) const
Returns
the current estimated normal.

Referenced by main().

◆ getOrigin()

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

◆ getState()

template<typename TPredicate , ProbingMode mode>
int DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::getState ( ) const
Returns
the current state of the parallelepiped i.e. the number of points of the parallelepiped that are inside the plane.

Referenced by main().

◆ hexagonState()

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

Referenced by main().

◆ inPlane()

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::inPlane ( Point const &  aPoint) const
private

A shortcut to the inPlane function of 'myNotAbovePredicate'

Parameters
aPointany digital point.
Returns
true if the point is inside, false otherwise.

◆ isInReverseState()

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::isInReverseState ( ) const
Returns
whether we are in a reversed state or not (strictly less than 4 points of the parallelepiped satisfy the predicate).

Referenced by main().

◆ isReduced()

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

Referenced by TEST_CASE().

◆ isSeparating()

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::isSeparating ( ) const
Returns
whether the current parallelepiped is separating or not (q and getOrigin are inside/outside or outside/inside the plane).

◆ isValid()

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< 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>
Vector DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::m ( int  aIndex) const
Parameters
aIndexthe index of the vector (between 0 and 2).
Returns
the i-th height vector \( m_i \).

Referenced by main().

◆ operator=() [1/2]

template<typename TPredicate , ProbingMode mode>
PlaneProbingParallelepipedEstimator & DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::operator= ( const PlaneProbingParallelepipedEstimator< 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>
PlaneProbingParallelepipedEstimator & DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::operator= ( PlaneProbingParallelepipedEstimator< TPredicate, mode > &&  other)
delete

Move assignment operator.

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

◆ q()

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

◆ selfDisplay()

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

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ translateIf()

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::translateIf ( UpdateOperation const &  aOp)
private

Translates (reverses) the current parallelepiped if needed (depending on the state).

Parameters
aOpthe operation to apply.
Returns
'true' if the parallelepiped is still separating, 'false' otherwise.

Field Documentation

◆ myIsInReverseState

template<typename TPredicate , ProbingMode mode>
bool DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::myIsInReverseState
private

We store whether we are in a reversed state or not

Definition at line 295 of file PlaneProbingParallelepipedEstimator.h.

◆ myNotAbovePredicate

template<typename TPredicate , ProbingMode mode>
NotAbovePredicate DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::myNotAbovePredicate
private

The NotAbove predicate.

Definition at line 293 of file PlaneProbingParallelepipedEstimator.h.

◆ myTetrahedronEstimator

template<typename TPredicate , ProbingMode mode>
TetrahedronEstimator DGtal::PlaneProbingParallelepipedEstimator< TPredicate, mode >::myTetrahedronEstimator
private

Internally, we use a plane probing tetrahedron estimator.

Definition at line 294 of file PlaneProbingParallelepipedEstimator.h.


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