DGtal  1.4.beta
DGtal::PlaneProbingR1Neighborhood< TPredicate > Class Template Reference

Aim: Represent a way to probe the R-neighborhood, with the R1 optimization, see [102] for details. More...

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

Inheritance diagram for DGtal::PlaneProbingR1Neighborhood< TPredicate >:
[legend]

Public Types

using Predicate = TPredicate
 
using Point = typename TPredicate::Point
 
using Triangle = typename PlaneProbingRNeighborhood< TPredicate >::Triangle
 
using PointOnProbingRay = typename PlaneProbingRNeighborhood< TPredicate >::PointOnProbingRay
 
using Integer = typename Point::Coordinate
 
using HexagonState = typename PlaneProbingRNeighborhood< TPredicate >::HexagonState
 
- Public Types inherited from DGtal::PlaneProbingRNeighborhood< TPredicate >
using Predicate = TPredicate
 
using Point = typename TPredicate::Point
 
using Triangle = typename PlaneProbingNeighborhood< TPredicate >::Triangle
 
using Integer = typename PlaneProbingNeighborhood< TPredicate >::Integer
 
using PointOnProbingRay = typename PlaneProbingNeighborhood< TPredicate >::PointOnProbingRay
 
using HexagonState = typename PlaneProbingNeighborhood< TPredicate >::HexagonState
 
- Public Types inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
enum class  HexagonState { Empty , NonConvex , NonPlanar , Planar }
 
using Predicate = TPredicate
 
using Point = typename Predicate::Point
 
using Vector = Point
 
using Integer = typename Point::Coordinate
 
using Triangle = std::array< Vector, 3 >
 
using PointOnProbingRay = detail::PointOnProbingRay< Integer >
 

Public Member Functions

 PlaneProbingR1Neighborhood ()=delete
 
 PlaneProbingR1Neighborhood (Predicate const &aPredicate, Point const &aQ, Triangle const &aM)
 
 ~PlaneProbingR1Neighborhood ()
 
 PlaneProbingR1Neighborhood (const PlaneProbingR1Neighborhood &other)=delete
 
 PlaneProbingR1Neighborhood (PlaneProbingR1Neighborhood &&other)=delete
 
PlaneProbingR1Neighborhoodoperator= (const PlaneProbingR1Neighborhood &other)=delete
 
PlaneProbingR1Neighborhoodoperator= (PlaneProbingR1Neighborhood &&other)=delete
 
virtual HexagonState hexagonState () override
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
- Public Member Functions inherited from DGtal::PlaneProbingRNeighborhood< TPredicate >
 PlaneProbingRNeighborhood ()=delete
 
 PlaneProbingRNeighborhood (Predicate const &aPredicate, Point const &aQ, Triangle const &aM)
 
 ~PlaneProbingRNeighborhood ()
 
 PlaneProbingRNeighborhood (const PlaneProbingRNeighborhood &other)=delete
 
 PlaneProbingRNeighborhood (PlaneProbingRNeighborhood &&other)=delete
 
PlaneProbingRNeighborhoodoperator= (const PlaneProbingRNeighborhood &other)=delete
 
PlaneProbingRNeighborhoodoperator= (PlaneProbingRNeighborhood &&other)=delete
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
- Public Member Functions inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
 PlaneProbingNeighborhood ()=delete
 
 PlaneProbingNeighborhood (Predicate const &aPredicate, Point const &aQ, Triangle const &aM)
 
virtual ~PlaneProbingNeighborhood ()
 
 PlaneProbingNeighborhood (const PlaneProbingNeighborhood &other)=delete
 
 PlaneProbingNeighborhood (PlaneProbingNeighborhood &&other)=delete
 
PlaneProbingNeighborhoodoperator= (const PlaneProbingNeighborhood &other)=delete
 
PlaneProbingNeighborhoodoperator= (PlaneProbingNeighborhood &&other)=delete
 
void setNeighbors (std::vector< PointOnProbingRay > const &aNeighbors)
 
UpdateOperation closestCandidate ()
 
virtual UpdateOperation getOperation (PointOnProbingRay const &aClosest) const
 
HexagonState classify (std::array< bool, 6 > const &aState) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< TPredicate >))
 
int getNeighborhoodCode () const
 
std::pair< PointOnProbingRay, PointOnProbingRaycandidateRay (int index) const
 
std::vector< PointOnProbingRayintersectSphereRay (PointOnProbingRay const &aPoint, PointOnProbingRay const &aRay) const
 
bool isValidIntersectSphereRay (PointOnProbingRay const &aPoint, PointOnProbingRay const &aRay, std::vector< PointOnProbingRay > const &aLst) const
 
PointOnProbingRay closestPointOnRayConstant (PointOnProbingRay const &aRay) const
 
PointOnProbingRay closestPointOnRayLinear (PointOnProbingRay const &aRay) const
 
PointOnProbingRay closestRayPoint (std::pair< PointOnProbingRay, PointOnProbingRay > const &aRayPoint) const
 

Private Attributes

std::array< bool, 6 > myState
 

Additional Inherited Members

- Protected Member Functions inherited from DGtal::PlaneProbingRNeighborhood< TPredicate >
PointOnProbingRay closestPointOnRayLogWithPredicate (PointOnProbingRay const &aRay) const
 
PointOnProbingRay closestPointOnRayLinearWithPredicate (PointOnProbingRay const &aRay) const
 
- Protected Member Functions inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
PointOnProbingRay closestPointInList (std::vector< PointOnProbingRay > const &aPoints) const
 
bool isNeighbor (PointOnProbingRay const &aRay) const
 
bool isSmallest (Point const &aX, Point const &aY) const
 
Point relativePoint (PointOnProbingRay const &aRay) const
 
Point absolutePoint (PointOnProbingRay const &aRay) const
 
- Protected Attributes inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
Predicate const & myPredicate
 
Point const & myQ
 
Triangle const & myM
 
std::vector< PointOnProbingRaymyCandidates
 
std::vector< PointOnProbingRaymyNeighbors
 
- Static Protected Attributes inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
static const PointOnProbingRay myNeighborhood [6]
 

Detailed Description

template<typename TPredicate>
class DGtal::PlaneProbingR1Neighborhood< TPredicate >

Aim: Represent a way to probe the R-neighborhood, with the R1 optimization, see [102] for details.

Description of template class 'PlaneProbingR1Neighborhood'

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

Definition at line 63 of file PlaneProbingR1Neighborhood.h.

Member Typedef Documentation

◆ HexagonState

template<typename TPredicate >
using DGtal::PlaneProbingR1Neighborhood< TPredicate >::HexagonState = typename PlaneProbingRNeighborhood<TPredicate>::HexagonState

Definition at line 74 of file PlaneProbingR1Neighborhood.h.

◆ Integer

template<typename TPredicate >
using DGtal::PlaneProbingR1Neighborhood< TPredicate >::Integer = typename Point::Coordinate

Definition at line 73 of file PlaneProbingR1Neighborhood.h.

◆ Point

template<typename TPredicate >
using DGtal::PlaneProbingR1Neighborhood< TPredicate >::Point = typename TPredicate::Point

Definition at line 70 of file PlaneProbingR1Neighborhood.h.

◆ PointOnProbingRay

template<typename TPredicate >
using DGtal::PlaneProbingR1Neighborhood< TPredicate >::PointOnProbingRay = typename PlaneProbingRNeighborhood<TPredicate>::PointOnProbingRay

Definition at line 72 of file PlaneProbingR1Neighborhood.h.

◆ Predicate

template<typename TPredicate >
using DGtal::PlaneProbingR1Neighborhood< TPredicate >::Predicate = TPredicate

Definition at line 69 of file PlaneProbingR1Neighborhood.h.

◆ Triangle

template<typename TPredicate >
using DGtal::PlaneProbingR1Neighborhood< TPredicate >::Triangle = typename PlaneProbingRNeighborhood<TPredicate>::Triangle

Definition at line 71 of file PlaneProbingR1Neighborhood.h.

Constructor & Destructor Documentation

◆ PlaneProbingR1Neighborhood() [1/4]

template<typename TPredicate >
DGtal::PlaneProbingR1Neighborhood< TPredicate >::PlaneProbingR1Neighborhood ( )
delete

Default constructor.

◆ PlaneProbingR1Neighborhood() [2/4]

template<typename TPredicate >
DGtal::PlaneProbingR1Neighborhood< TPredicate >::PlaneProbingR1Neighborhood ( Predicate const &  aPredicate,
Point const &  aQ,
Triangle const &  aM 
)

Constructor.

Parameters
aPredicatea probing predicate.
aQthe fixed point 'q'.
aMa frame composed of the three vectors.

◆ ~PlaneProbingR1Neighborhood()

template<typename TPredicate >
DGtal::PlaneProbingR1Neighborhood< TPredicate >::~PlaneProbingR1Neighborhood ( )

Destructor.

◆ PlaneProbingR1Neighborhood() [3/4]

template<typename TPredicate >
DGtal::PlaneProbingR1Neighborhood< TPredicate >::PlaneProbingR1Neighborhood ( const PlaneProbingR1Neighborhood< TPredicate > &  other)
delete

Copy constructor.

Parameters
otherthe object to clone.

◆ PlaneProbingR1Neighborhood() [4/4]

template<typename TPredicate >
DGtal::PlaneProbingR1Neighborhood< TPredicate >::PlaneProbingR1Neighborhood ( PlaneProbingR1Neighborhood< TPredicate > &&  other)
delete

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename TPredicate >
DGtal::PlaneProbingR1Neighborhood< TPredicate >::BOOST_CONCEPT_ASSERT ( (concepts::CPointPredicate< TPredicate >)  )
private

◆ candidateRay()

template<typename TPredicate >
std::pair<PointOnProbingRay, PointOnProbingRay> DGtal::PlaneProbingR1Neighborhood< TPredicate >::candidateRay ( int  index) const
private
Parameters
indexan integer between 0 and 2.
Returns
a pair of a point on a ray and a ray.

◆ closestPointOnRayConstant()

template<typename TPredicate >
PointOnProbingRay DGtal::PlaneProbingR1Neighborhood< TPredicate >::closestPointOnRayConstant ( PointOnProbingRay const &  aRay) const
private
Parameters
aRaya ray.
Returns
the closest point on a ray using [102] Algorithm 4.

◆ closestPointOnRayLinear()

template<typename TPredicate >
PointOnProbingRay DGtal::PlaneProbingR1Neighborhood< TPredicate >::closestPointOnRayLinear ( PointOnProbingRay const &  aRay) const
private
Parameters
aRaya ray.
Returns
the closest point on the ray using a linear search.

◆ closestRayPoint()

template<typename TPredicate >
PointOnProbingRay DGtal::PlaneProbingR1Neighborhood< TPredicate >::closestRayPoint ( std::pair< PointOnProbingRay, PointOnProbingRay > const &  aRayPoint) const
private
Parameters
aRayPointa pair describing a ray and a point on a ray.
Returns
the closest point among the points of a ray and a point on another ray.

◆ getNeighborhoodCode()

template<typename TPredicate >
int DGtal::PlaneProbingR1Neighborhood< TPredicate >::getNeighborhoodCode ( ) const
private
Returns
an integer coding the current configuration of the H-neighborhood.

◆ hexagonState()

template<typename TPredicate >
virtual HexagonState DGtal::PlaneProbingR1Neighborhood< TPredicate >::hexagonState ( )
overridevirtual

Computes the current state of the neighborhood. This is the function that is overloaded for the different probing modes.

Returns
the hexagon state, see HexagonState.

Reimplemented from DGtal::PlaneProbingRNeighborhood< TPredicate >.

◆ intersectSphereRay()

template<typename TPredicate >
std::vector<PointOnProbingRay> DGtal::PlaneProbingR1Neighborhood< TPredicate >::intersectSphereRay ( PointOnProbingRay const &  aPoint,
PointOnProbingRay const &  aRay 
) const
private
Parameters
aPointa point on a ray.
aRaya ray.
Returns
extremal points of aRay included in the sphere passing through aPoint and the current triangle.

◆ isValid()

template<typename TPredicate >
bool DGtal::PlaneProbingR1Neighborhood< TPredicate >::isValid ( ) const

Checks the validity/consistency of the object.

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

◆ isValidIntersectSphereRay()

template<typename TPredicate >
bool DGtal::PlaneProbingR1Neighborhood< TPredicate >::isValidIntersectSphereRay ( PointOnProbingRay const &  aPoint,
PointOnProbingRay const &  aRay,
std::vector< PointOnProbingRay > const &  aLst 
) const
private

Sanity check for point returned by intersectSphereRay.

Parameters
aPointa point on a ray.
aRaya ray.
aLsta list of points on a ray.
Returns
'true' if the points of aLst are indeed in the sphere passing through aPoint and the current triangle, 'false' otherwise.

◆ operator=() [1/2]

template<typename TPredicate >
PlaneProbingR1Neighborhood& DGtal::PlaneProbingR1Neighborhood< TPredicate >::operator= ( const PlaneProbingR1Neighborhood< TPredicate > &  other)
delete

Copy assignment operator.

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

◆ operator=() [2/2]

template<typename TPredicate >
PlaneProbingR1Neighborhood& DGtal::PlaneProbingR1Neighborhood< TPredicate >::operator= ( PlaneProbingR1Neighborhood< TPredicate > &&  other)
delete

Move assignment operator.

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

◆ selfDisplay()

template<typename TPredicate >
void DGtal::PlaneProbingR1Neighborhood< TPredicate >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

◆ myState

template<typename TPredicate >
std::array<bool, 6> DGtal::PlaneProbingR1Neighborhood< TPredicate >::myState
mutableprivate

The current state of the H-neighborhood.

Definition at line 147 of file PlaneProbingR1Neighborhood.h.


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