DGtal  1.5.beta
DGtal::PlaneProbingLNeighborhood< TPredicate > Class Template Reference

Aim: Represents a way to probe the L-neighborhood, see [87] for details. More...

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

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

Data Structures

struct  ClosestGridPoint
 Aim: Used to store the closest grid point associated to a vertex of the triangle and two extra boolean values about the local configuration at that vertex. More...
 

Public Types

using Predicate = TPredicate
 
using Point = typename Predicate::Point
 
using Vector = Point
 
using Integer = typename Point::Coordinate
 
using Triangle = std::array< Vector, 3 >
 
using HexagonState = typename PlaneProbingNeighborhood< TPredicate >::HexagonState
 
using UpdateOperation = typename PlaneProbingNeighborhood< TPredicate >::UpdateOperation
 
using Index = typename PlaneProbingNeighborhood< TPredicate >::Index
 
using PointOnProbingRay = typename PlaneProbingNeighborhood< TPredicate >::PointOnProbingRay
 
using GridPoint = typename detail::GridPoint< Integer, Index >
 
using GridPointOnProbingRay = typename detail::GridPointOnProbingRay< Integer, Index >
 
- 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 Index = std::size_t
 
using PointOnProbingRay = detail::PointOnProbingRay< Integer, Index >
 

Public Member Functions

 PlaneProbingLNeighborhood ()=delete
 
 PlaneProbingLNeighborhood (Predicate const &aPredicate, Point const &aQ, Triangle const &aM)
 
 ~PlaneProbingLNeighborhood ()
 
 PlaneProbingLNeighborhood (const PlaneProbingLNeighborhood &other)=delete
 
 PlaneProbingLNeighborhood (PlaneProbingLNeighborhood &&other)=delete
 
PlaneProbingLNeighborhoodoperator= (const PlaneProbingLNeighborhood &other)=delete
 
PlaneProbingLNeighborhoodoperator= (PlaneProbingLNeighborhood &&other)=delete
 
HexagonState hexagonState () override
 
UpdateOperation closestCandidate () 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 getOperation (PointOnProbingRay const &aClosest) const
 
HexagonState classify (std::array< bool, 6 > const &aState) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Member Functions

ClosestGridPoint closestInGrid (const Index &aIdx) const
 
void candidatesInGrid (const GridPoint &y1, const GridPoint &y2, std::back_insert_iterator< std::vector< GridPoint > > out) const
 
GridPointOnProbingRay closestOnBoundedRayLinearWithPredicate (GridPointOnProbingRay const &aRay, Integer const &aBound) const
 
GridPointOnProbingRay closestOnBoundedRayLogWithPredicate (GridPointOnProbingRay const &aRay, Integer const &aBound) const
 
UpdateOperation getOperationFromGridPoint (GridPoint const &aClosest) const
 
void updateGrid (const Index &aIdx)
 
Point direction (GridPoint const &aP) const
 
- Protected Member Functions inherited from DGtal::PlaneProbingRNeighborhood< TPredicate >
template<typename TPointAdapter >
TPointAdapter closestPointOnRayLogWithPredicate (TPointAdapter const &aRay) const
 
template<typename TPointAdapter >
TPointAdapter closestPointOnRayLinearWithPredicate (TPointAdapter const &aRay) const
 
- Protected Member Functions inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
template<class TPointAdapter >
TPointAdapter closestPointInList (std::vector< TPointAdapter > const &aPoints) const
 
bool isNeighbor (PointOnProbingRay const &aRay) const
 
bool isSmallest (Point const &aX, Point const &aY) const
 
template<class TPointAdapter >
Point relativePoint (TPointAdapter const &aPoint) const
 
template<class TPointAdapter >
Point absolutePoint (TPointAdapter const &aPoint) const
 

Protected Attributes

std::vector< ClosestGridPointmyGrids
 
- Protected Attributes inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
Predicate const & myPredicate
 
Point const & myQ
 
Triangle const & myM
 
std::vector< PointOnProbingRaymyCandidates
 
std::vector< PointOnProbingRaymyNeighbors
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((DGtal::concepts::CPointPredicate< TPredicate >))
 

Additional Inherited Members

- Static Protected Attributes inherited from DGtal::PlaneProbingNeighborhood< TPredicate >
static const PointOnProbingRay myNeighborhood [6]
 

Detailed Description

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

Aim: Represents a way to probe the L-neighborhood, see [87] for details.

Description of template class 'PlaneProbingLNeighborhood'

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

Definition at line 65 of file PlaneProbingLNeighborhood.h.

Member Typedef Documentation

◆ GridPoint

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::GridPoint = typename detail::GridPoint<Integer, Index>

Definition at line 82 of file PlaneProbingLNeighborhood.h.

◆ GridPointOnProbingRay

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::GridPointOnProbingRay = typename detail::GridPointOnProbingRay<Integer, Index>

Definition at line 83 of file PlaneProbingLNeighborhood.h.

◆ HexagonState

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::HexagonState = typename PlaneProbingNeighborhood<TPredicate>::HexagonState

Definition at line 77 of file PlaneProbingLNeighborhood.h.

◆ Index

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::Index = typename PlaneProbingNeighborhood<TPredicate>::Index

Definition at line 80 of file PlaneProbingLNeighborhood.h.

◆ Integer

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

Definition at line 74 of file PlaneProbingLNeighborhood.h.

◆ Point

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::Point = typename Predicate::Point

Definition at line 72 of file PlaneProbingLNeighborhood.h.

◆ PointOnProbingRay

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::PointOnProbingRay = typename PlaneProbingNeighborhood<TPredicate>::PointOnProbingRay

Definition at line 81 of file PlaneProbingLNeighborhood.h.

◆ Predicate

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

Definition at line 71 of file PlaneProbingLNeighborhood.h.

◆ Triangle

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::Triangle = std::array<Vector, 3>

Definition at line 75 of file PlaneProbingLNeighborhood.h.

◆ UpdateOperation

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::UpdateOperation = typename PlaneProbingNeighborhood<TPredicate>::UpdateOperation

Definition at line 78 of file PlaneProbingLNeighborhood.h.

◆ Vector

template<typename TPredicate >
using DGtal::PlaneProbingLNeighborhood< TPredicate >::Vector = Point

Definition at line 73 of file PlaneProbingLNeighborhood.h.

Constructor & Destructor Documentation

◆ PlaneProbingLNeighborhood() [1/4]

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

Default constructor.

◆ PlaneProbingLNeighborhood() [2/4]

template<typename TPredicate >
DGtal::PlaneProbingLNeighborhood< TPredicate >::PlaneProbingLNeighborhood ( 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.

◆ ~PlaneProbingLNeighborhood()

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

Destructor.

◆ PlaneProbingLNeighborhood() [3/4]

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

Copy constructor.

Parameters
otherthe object to clone.

◆ PlaneProbingLNeighborhood() [4/4]

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

Move constructor.

Parameters
otherthe object to move.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ candidatesInGrid()

template<typename TPredicate >
void DGtal::PlaneProbingLNeighborhood< TPredicate >::candidatesInGrid ( const GridPoint y1,
const GridPoint y2,
std::back_insert_iterator< std::vector< GridPoint > >  out 
) const
protected

Computes the candidate grid points lying in a cone given by two grid points.

Parameters
y1a first grid point
y2a second grid point
outan output iterator on grid points

◆ closestCandidate()

template<typename TPredicate >
UpdateOperation DGtal::PlaneProbingLNeighborhood< TPredicate >::closestCandidate ( )
overridevirtual

Computes the closest candidate point, used for updating a frame in a plane probing based estimator.

Returns
the update operation to apply.

Reimplemented from DGtal::PlaneProbingNeighborhood< TPredicate >.

◆ closestInGrid()

template<typename TPredicate >
ClosestGridPoint DGtal::PlaneProbingLNeighborhood< TPredicate >::closestInGrid ( const Index aIdx) const
protected

Computes the closest candidate point in a given grid identified by the index of the associated vertex.

Parameters
aIdx
Returns
an instance of ClosestGridPoint.

◆ closestOnBoundedRayLinearWithPredicate()

template<typename TPredicate >
GridPointOnProbingRay DGtal::PlaneProbingLNeighborhood< TPredicate >::closestOnBoundedRayLinearWithPredicate ( GridPointOnProbingRay const &  aRay,
Integer const &  aBound 
) const
protected

Finds a closest point on a given ray using a linear search.

Parameters
aRaya ray.
aBounda bound that limits the search range.
Returns
a closest point on the ray.

◆ closestOnBoundedRayLogWithPredicate()

template<typename TPredicate >
GridPointOnProbingRay DGtal::PlaneProbingLNeighborhood< TPredicate >::closestOnBoundedRayLogWithPredicate ( GridPointOnProbingRay const &  aRay,
Integer const &  aBound 
) const
protected

Finds a closest point on a given ray using a binary search.

Parameters
aRaya ray.
aBounda bound that limits the search range.
Returns
a closest point on the ray.

◆ direction()

template<typename TPredicate >
Point DGtal::PlaneProbingLNeighborhood< TPredicate >::direction ( GridPoint const &  aP) const
protected

Returns the vector from the base to a grid point.

Parameters
aPa point on a grid.
Returns
the vector.

◆ getOperationFromGridPoint()

template<typename TPredicate >
UpdateOperation DGtal::PlaneProbingLNeighborhood< TPredicate >::getOperationFromGridPoint ( GridPoint const &  aClosest) const
protected

Constructs an update operation from the closest candidate point.

Parameters
aClosestthe closest candidate point.
Returns
the update operation.

◆ hexagonState()

template<typename TPredicate >
HexagonState DGtal::PlaneProbingLNeighborhood< 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 >.

◆ isValid()

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

Checks the validity/consistency of the object.

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

◆ operator=() [1/2]

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

Copy assignment operator.

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

◆ operator=() [2/2]

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

Move assignment operator.

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

◆ selfDisplay()

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

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ updateGrid()

template<typename TPredicate >
void DGtal::PlaneProbingLNeighborhood< TPredicate >::updateGrid ( const Index aIdx)
protected

Update a grid after a triangle update. This procedure is called at the beginning of every call to hexagonState, which must prepare the computations.

Parameters
aIdx

Field Documentation

◆ myGrids

template<typename TPredicate >
std::vector<ClosestGridPoint> DGtal::PlaneProbingLNeighborhood< TPredicate >::myGrids
protected

closest point and additional useful data stored at each vertex.

Definition at line 194 of file PlaneProbingLNeighborhood.h.


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