DGtal
0.6.devel
|
#include <SurfelNeighborhood.h>
Public Types | |
typedef TKSpace | KSpace |
typedef KSpace::Point | Point |
typedef KSpace::Cell | Cell |
typedef KSpace::SCell | SCell |
Public Member Functions | |
~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 |
Private Attributes | |
const KSpace * | mySpace |
const SurfelAdjacency < KSpace::dimension > * | mySurfelAdj |
SCell | mySurfel |
Dimension | myOrthDir |
bool | myOrthDirect |
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'
TKSpace | the type of celluler grid space (for instance, a KhalimskySpaceND). |
Essentially a backport from ImaGene.
Definition at line 68 of file SurfelNeighborhood.h.
typedef KSpace::Cell DGtal::SurfelNeighborhood< TKSpace >::Cell |
Definition at line 75 of file SurfelNeighborhood.h.
typedef TKSpace DGtal::SurfelNeighborhood< TKSpace >::KSpace |
Definition at line 73 of file SurfelNeighborhood.h.
typedef KSpace::Point DGtal::SurfelNeighborhood< TKSpace >::Point |
Definition at line 74 of file SurfelNeighborhood.h.
typedef KSpace::SCell DGtal::SurfelNeighborhood< TKSpace >::SCell |
Definition at line 76 of file SurfelNeighborhood.h.
|
inline |
|
inline |
Constructor. The object is not valid.
Definition at line 53 of file SurfelNeighborhood.ih.
|
inline |
Copy constructor.
other | the object to clone. |
Definition at line 60 of file SurfelNeighborhood.ih.
|
inline |
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. |
Definition at line 182 of file SurfelNeighborhood.ih.
|
inline |
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. |
Definition at line 192 of file SurfelNeighborhood.ih.
|
inline |
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. |
Definition at line 205 of file SurfelNeighborhood.ih.
|
inline |
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).
DigitalSet | any model of digital set, i.e. a set of digital points, having 'find( const Point & ) : const_iterator'. |
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. |
Definition at line 283 of file SurfelNeighborhood.ih.
unsigned int DGtal::SurfelNeighborhood< TKSpace >::getAdjacentOnPointPredicate | ( | SCell & | adj_surfel, |
const PointPredicate & | pp, | ||
Dimension | track_dir, | ||
bool | pos | ||
) | const |
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).
PointPredicate | any model of predicate on point, i.e. a boolean functor returning 'true' when the point belongs to the object. It is a model of CPointPredicate. The type SurfelNeighborhood::Point should be the same as PointPredicate::Point. |
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. |
Definition at line 350 of file SurfelNeighborhood.ih.
Referenced by DGtal::Surfaces< TKSpace >::track2DBoundary(), DGtal::Surfaces< TKSpace >::track2DSliceBoundary(), DGtal::Surfaces< TKSpace >::trackBoundary(), and DGtal::Surfaces< TKSpace >::trackClosedBoundary().
|
inline |
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).
SpelSet | any model of a set of unsigned spels, having 'find( const Spel & ) : const_iterator'. |
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. |
Definition at line 219 of file SurfelNeighborhood.ih.
unsigned int DGtal::SurfelNeighborhood< TKSpace >::getAdjacentOnSurfelPredicate | ( | SCell & | adj_surfel, |
const SurfelPredicate & | sp, | ||
Dimension | track_dir, | ||
bool | pos | ||
) | const |
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).
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. |
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. |
Definition at line 414 of file SurfelNeighborhood.ih.
Referenced by DGtal::Surfaces< TKSpace >::track2DSliceSurface(), DGtal::Surfaces< TKSpace >::track2DSurface(), DGtal::Surfaces< TKSpace >::trackClosedSurface(), and DGtal::Surfaces< TKSpace >::trackSurface().
|
inline |
Initializes space, adjacency, surfel.
space | the cellular grid space (only referenced). |
adj | the chosen surfel adjacency (only referenced). |
aSurfel | any signed surfel of [space] ((n-1)-cell). |
Definition at line 87 of file SurfelNeighborhood.ih.
Referenced by DGtal::Surfaces< TKSpace >::track2DBoundary(), DGtal::Surfaces< TKSpace >::track2DSliceBoundary(), DGtal::Surfaces< TKSpace >::track2DSliceSurface(), DGtal::Surfaces< TKSpace >::track2DSurface(), DGtal::Surfaces< TKSpace >::trackBoundary(), DGtal::Surfaces< TKSpace >::trackClosedBoundary(), DGtal::Surfaces< TKSpace >::trackClosedSurface(), DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Tracker::Tracker(), DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::Tracker(), DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::Tracker(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::Tracker(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker(), DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker(), and DGtal::Surfaces< TKSpace >::trackSurface().
|
inline |
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. |
Definition at line 159 of file SurfelNeighborhood.ih.
|
inline |
Definition at line 139 of file SurfelNeighborhood.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 505 of file SurfelNeighborhood.ih.
|
inline |
Assignment.
other | the object to copy. |
Definition at line 70 of file SurfelNeighborhood.ih.
References DGtal::SurfelNeighborhood< TKSpace >::myOrthDir, DGtal::SurfelNeighborhood< TKSpace >::myOrthDirect, DGtal::SurfelNeighborhood< TKSpace >::mySpace, DGtal::SurfelNeighborhood< TKSpace >::mySurfel, and DGtal::SurfelNeighborhood< TKSpace >::mySurfelAdj.
|
inline |
Definition at line 127 of file SurfelNeighborhood.ih.
|
inline |
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. |
Definition at line 169 of file SurfelNeighborhood.ih.
|
inline |
Definition at line 149 of file SurfelNeighborhood.ih.
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 497 of file SurfelNeighborhood.ih.
|
inline |
Sets the neighborhood to the given [surfel].
aSurfel | any signed surfel of this space ((n-1)-cell). |
Definition at line 103 of file SurfelNeighborhood.ih.
Referenced by DGtal::Surfaces< TKSpace >::track2DBoundary(), DGtal::Surfaces< TKSpace >::track2DSliceBoundary(), DGtal::Surfaces< TKSpace >::track2DSliceSurface(), DGtal::Surfaces< TKSpace >::track2DSurface(), DGtal::Surfaces< TKSpace >::trackBoundary(), DGtal::Surfaces< TKSpace >::trackClosedBoundary(), DGtal::Surfaces< TKSpace >::trackClosedSurface(), and DGtal::Surfaces< TKSpace >::trackSurface().
|
inline |
Definition at line 118 of file SurfelNeighborhood.ih.
|
private |
The orthogonal direction to [mySurfel].
Definition at line 332 of file SurfelNeighborhood.h.
Referenced by DGtal::SurfelNeighborhood< TKSpace >::operator=().
|
private |
The direct orientation in the orthogonal direction wrt [mySurfel].
Definition at line 335 of file SurfelNeighborhood.h.
Referenced by DGtal::SurfelNeighborhood< TKSpace >::operator=().
|
private |
A pointer to the digital space.
Definition at line 326 of file SurfelNeighborhood.h.
Referenced by DGtal::SurfelNeighborhood< TKSpace >::operator=().
|
private |
The current surfel.
Definition at line 330 of file SurfelNeighborhood.h.
Referenced by DGtal::SurfelNeighborhood< TKSpace >::operator=().
|
private |
A pointer to the bel adjacency.
Definition at line 328 of file SurfelNeighborhood.h.
Referenced by DGtal::SurfelNeighborhood< TKSpace >::operator=().