Aim: This helper class is useful to compute the neighboring surfels of a given surfel, especially over a digital surface or over an object boundary. Two signed surfels are incident if they share a common n-2 cell. This class uses a SurfelAdjacency so as to determine adjacent surfels (either looking for them from interior to exterior or inversely).
More...
#include <DGtal/topology/SurfelNeighborhood.h>
|
| | ~SurfelNeighborhood () |
| |
| | SurfelNeighborhood () |
| |
| | SurfelNeighborhood (const SurfelNeighborhood &other) |
| |
| SurfelNeighborhood & | operator= (const SurfelNeighborhood &other) |
| |
| void | init (const KSpace *space, const SurfelAdjacency< KSpace::dimension > *adj, const SCell &aSurfel) |
| |
| void | setSurfel (const SCell &aSurfel) |
| |
| const SCell & | surfel () const |
| |
| Dimension | orthDir () const |
| |
| SCell | innerSpel () const |
| |
| SCell | outerSpel () const |
| |
| SCell | innerAdjacentSpel (Dimension track_dir, bool pos) const |
| |
| SCell | outerAdjacentSpel (Dimension track_dir, bool pos) const |
| |
| SCell | follower1 (Dimension track_dir, bool pos) const |
| |
| SCell | follower2 (Dimension track_dir, bool pos) const |
| |
| SCell | follower3 (Dimension track_dir, bool pos) const |
| |
| template<typename SpelSet > |
| unsigned int | getAdjacentOnSpelSet (SCell &adj_surfel, const SpelSet &obj, Dimension track_dir, bool pos) const |
| |
| template<typename DigitalSet > |
| unsigned int | getAdjacentOnDigitalSet (SCell &adj_surfel, const DigitalSet &obj, Dimension track_dir, bool pos) const |
| |
| template<typename PointPredicate > |
| unsigned int | getAdjacentOnPointPredicate (SCell &adj_surfel, const PointPredicate &pp, Dimension track_dir, bool pos) const |
| |
| template<typename SurfelPredicate > |
| unsigned int | getAdjacentOnSurfelPredicate (SCell &adj_surfel, const SurfelPredicate &sp, Dimension track_dir, bool pos) const |
| |
| void | selfDisplay (std::ostream &out) const |
| |
| bool | isValid () const |
| |
template<typename TKSpace>
class DGtal::SurfelNeighborhood< TKSpace >
Aim: This helper class is useful to compute the neighboring surfels of a given surfel, especially over a digital surface or over an object boundary. Two signed surfels are incident if they share a common n-2 cell. This class uses a SurfelAdjacency so as to determine adjacent surfels (either looking for them from interior to exterior or inversely).
Description of template class 'SurfelNeighborhood'
- Template Parameters
-
Essentially a backport from ImaGene.
Definition at line 68 of file SurfelNeighborhood.h.
◆ Cell
template<typename TKSpace >
◆ KSpace
template<typename TKSpace >
◆ Point
template<typename TKSpace >
◆ SCell
template<typename TKSpace >
◆ ~SurfelNeighborhood()
template<typename TKSpace >
◆ SurfelNeighborhood() [1/2]
template<typename TKSpace >
Constructor. The object is not valid.
◆ SurfelNeighborhood() [2/2]
template<typename TKSpace >
Copy constructor.
- Parameters
-
| other | the object to clone. |
◆ follower1()
template<typename TKSpace >
- Parameters
-
| track_dir | the direction where to look for the follower (different from 'orthDir()'. |
| pos | when 'true', indicates to look for the follower along the positive direction of the tracking axis, otherwise along the negative direction. |
- Returns
- the first follower of 'surfel()'.
◆ follower2()
template<typename TKSpace >
- Parameters
-
| track_dir | the direction where to look for the follower (different from 'orthDir()'. |
| pos | when 'true', indicates to look for the follower along the positive direction of the tracking axis, otherwise along the negative direction. |
- Returns
- the second follower of 'surfel()'.
◆ follower3()
template<typename TKSpace >
- Parameters
-
| track_dir | the direction where to look for the follower (different from 'orthDir()'. |
| pos | when 'true', indicates to look for the follower along the positive direction of the tracking axis, otherwise along the negative direction. |
- Returns
- the third follower of 'surfel()'.
◆ getAdjacentOnDigitalSet()
template<typename TKSpace >
template<typename DigitalSet >
Go to the next direct or indirect adjacent bel on the boundary of some digital [obj]. The boundary may be open (it touches the space borders).
- Template Parameters
-
| DigitalSet | any model of digital set, i.e. a set of digital points, having 'find( const Point & ) : const_iterator'. |
- Parameters
-
| adj_surfel | (returns) the signed adjacent surfel in direction [track_dir] if there is one. |
| obj | any set of unsigned spels (n-cells). |
| track_dir | the direction where to look for the spel. |
| pos | when 'true' look in positive direction along [track_dir] axis, 'false' look in negative direction. |
- Returns
- 0 if the move was impossible (no bels in this direction), 1 if it was the first interior, 2 if it was the second interior, 3 if it was the third interior.
Referenced by testSurfelAdjacency().
◆ getAdjacentOnPointPredicate()
template<typename TKSpace >
template<typename PointPredicate >
Go to the next direct or indirect adjacent bel on the boundary of some digital set defined by a PointPredicate [pp]. The boundary may be open (it touches the space borders).
- Template Parameters
-
- Parameters
-
| adj_surfel | (returns) the signed adjacent surfel in direction [track_dir] if there is one. |
| pp | any predicate taking a Point and returning 'true' whenever the point belongs to the object. |
| track_dir | the direction where to look for the spel. |
| pos | when 'true' look in positive direction along [track_dir] axis, 'false' look in negative direction. |
- Returns
- 0 if the move was impossible (no bels in this direction), 1 if it was the first interior, 2 if it was the second interior, 3 if it was the third interior.
◆ getAdjacentOnSpelSet()
template<typename TKSpace >
template<typename SpelSet >
Go to the next direct or indirect adjacent bel on the boundary of some set of unsigned spels [obj]. The boundary may be open (it touches the space borders).
- Template Parameters
-
| SpelSet | any model of a set of unsigned spels, having 'find( const Spel & ) : const_iterator'. |
- Parameters
-
| adj_surfel | (returns) the signed adjacent surfel in direction [track_dir] if there is one. |
| obj | any set of unsigned spels (n-cells). |
| track_dir | the direction where to look for the spel. |
| pos | when 'true' look in positive direction along [track_dir] axis, 'false' look in negative direction. |
- Returns
- 0 if the move was impossible (no bels in this direction), 1 if it was the first interior, 2 if it was the second interior, 3 if it was the third interior.
◆ getAdjacentOnSurfelPredicate()
template<typename TKSpace >
template<typename SurfelPredicate >
Go to the next direct or indirect adjacent bel on some set of surfels defined by a SurfelPredicate [sp]. The digital surface may be open (for instance, it may touch the space borders or may be open).
- Template Parameters
-
| SurfelPredicate | any model of predicate on surfel, i.e. a boolean functor returning 'true' when the surfel belongs to the digital surface. It is a model of CSurfelPredicate. |
- Parameters
-
| adj_surfel | (returns) the signed adjacent surfel in direction [track_dir] if there is one. |
| sp | any predicate taking a Surfel and returning 'true' whenever the surfel belongs to the surface. |
| track_dir | the direction where to look for the spel. |
| pos | when 'true' look in positive direction along [track_dir] axis, 'false' look in negative direction. |
- Returns
- 0 if the move was impossible (no bels in this direction), 1 if it was the first interior, 2 if it was the second interior, 3 if it was the third interior.
◆ init()
template<typename TKSpace >
Initializes space, adjacency, surfel.
- Parameters
-
| space | the cellular grid space (only referenced). |
| adj | the chosen surfel adjacency (only referenced). |
| aSurfel | any signed surfel of [space] ((n-1)-cell). |
Referenced by testSurfelAdjacency().
◆ innerAdjacentSpel()
template<typename TKSpace >
- Parameters
-
| track_dir | the direction where to look for the spel. |
| pos | when 'true', looks along the positive direction of the tracking axis, otherwise along the negative direction. |
- Returns
- the (positively oriented) spel adjacent to 'innerSpel()' in the direction [track_dir] and orientation [pos].
◆ innerSpel()
template<typename TKSpace >
- Returns
- the positively oriented spel touching the surfel 'surfel()'.
◆ isValid()
template<typename TKSpace >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ operator=()
template<typename TKSpace >
Assignment.
- Parameters
-
- Returns
- a reference on 'this'.
◆ orthDir()
template<typename TKSpace >
- Returns
- the orthogonal direction to the current surfel.
◆ outerAdjacentSpel()
template<typename TKSpace >
- Parameters
-
| track_dir | the direction where to look for the spel. |
| pos | when 'true', looks along the positive direction of the tracking axis, otherwise along the negative direction. |
- Returns
- the (negatively oriented) spel adjacent to 'outerSpel()' in the direction [track_dir] and orientation [pos].
◆ outerSpel()
template<typename TKSpace >
- Returns
- the negatively oriented spel touching the surfel 'surfel()'.
◆ selfDisplay()
template<typename TKSpace >
Writes/Displays the object on an output stream.
- Parameters
-
| out | the output stream where the object is written. |
◆ setSurfel()
template<typename TKSpace >
Sets the neighborhood to the given [surfel].
- Parameters
-
| aSurfel | any signed surfel of this space ((n-1)-cell). |
◆ surfel()
template<typename TKSpace >
- Returns
- the current surfel.
◆ myOrthDir
template<typename TKSpace >
◆ myOrthDirect
template<typename TKSpace >
The direct orientation in the orthogonal direction wrt [mySurfel].
- See also
- m_surfel
Definition at line 335 of file SurfelNeighborhood.h.
◆ mySpace
template<typename TKSpace >
◆ mySurfel
template<typename TKSpace >
◆ mySurfelAdj
template<typename TKSpace >
The documentation for this class was generated from the following file: