DGtal  0.9.3beta
Public Types | Public Member Functions | Private Attributes
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker Class Reference

#include <DGtal/topology/SetOfSurfels.h>

Collaboration diagram for DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker:
[legend]

Public Types

typedef Tracker Self
 
typedef SetOfSurfels< TKSpace, TSurfelSet > DigitalSurfaceContainer
 
typedef TKSpace::SCell Surfel
 
typedef TKSpace KSpace
 
typedef SurfelNeighborhood< KSpaceNeighborhood
 

Public Member Functions

 Tracker (ConstAlias< DigitalSurfaceContainer > aSurface, const Surfel &s)
 
 Tracker (const Tracker &other)
 
 ~Tracker ()
 
const DigitalSurfaceContainersurface () const
 
const Surfelcurrent () const
 
Dimension orthDir () const
 
void move (const Surfel &s)
 
uint8_t adjacent (Surfel &s, Dimension d, bool pos) const
 

Private Attributes

const DigitalSurfaceContainermySurface
 
Neighborhood myNeighborhood
 

Detailed Description

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
class DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker

A model of CDigitalSurfaceTracker for SetOfSurfels.

Definition at line 80 of file SetOfSurfels.h.

Member Typedef Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef SetOfSurfels<TKSpace,TSurfelSet> DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::DigitalSurfaceContainer

Definition at line 85 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef TKSpace DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::KSpace

Definition at line 89 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef SurfelNeighborhood<KSpace> DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::Neighborhood

Definition at line 90 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef Tracker DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::Self

Definition at line 84 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef TKSpace::SCell DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::Surfel

Definition at line 86 of file SetOfSurfels.h.

Constructor & Destructor Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::Tracker ( ConstAlias< DigitalSurfaceContainer aSurface,
const Surfel s 
)

Constructor from surface container and surfel.

Parameters
aSurfacethe container describing the surface.
sthe surfel on which the tracker is initialized.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::Tracker ( const Tracker other)

Copy constructor.

Parameters
otherthe object to clone.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::~Tracker ( )

Destructor.

Member Function Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
uint8_t DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::adjacent ( Surfel s,
Dimension  d,
bool  pos 
) const

Computes the surfel adjacent to 'current()' in the direction [d] along orientation [pos].

Parameters
s(modified) set to the adjacent surfel in the specified direction d and orientation pos if it exists. Otherwise unchanged (method returns 0 in this case).
dany direction different from 'orthDir()'.
poswhen 'true' look in positive direction along [track_dir] axis, 'false' look in negative direction.
Returns
the move code (n=0-3). When 0: no adjacent surfel, otherwise 1-3: adjacent surfel is n-th follower.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const Surfel& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::current ( ) const
Returns
the current surfel on which the tracker is.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
void DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::move ( const Surfel s)

Moves the tracker to the given valid surfel.

Precondition
'surface().isInside( s )'
Parameters
sthe surfel on which the tracker is moved.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
Dimension DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::orthDir ( ) const
Returns
the orthogonal direction to the current surfel.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const DigitalSurfaceContainer& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::surface ( ) const
Returns
the surface container that the Tracker is tracking.

Field Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
Neighborhood DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::myNeighborhood
private

the current surfel neighborhood, the object that holds the necessary information for determining neighbors.

Definition at line 150 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const DigitalSurfaceContainer& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Tracker::mySurface
private

a reference to the digital surface container on which is the tracker.

Definition at line 147 of file SetOfSurfels.h.


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