DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes
DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker Class Reference

#include <LightExplicitDigitalSurface.h>

Collaboration diagram for DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker:
Collaboration graph
[legend]

Public Types

typedef Tracker Self
typedef
LightExplicitDigitalSurface
< TKSpace, TSurfelPredicate > 
DigitalSurfaceContainer
typedef TKSpace::SCell Surfel
typedef TKSpace KSpace
typedef SurfelNeighborhood
< KSpace
Neighborhood

Public Member Functions

 Tracker (const 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 TSurfelPredicate>
class DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker

A model of CDigitalSurfaceTracker for LightExplicitDigitalSurface.

Definition at line 85 of file LightExplicitDigitalSurface.h.


Member Typedef Documentation

template<typename TKSpace, typename TSurfelPredicate>
typedef LightExplicitDigitalSurface<TKSpace,TSurfelPredicate> DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::DigitalSurfaceContainer

Definition at line 91 of file LightExplicitDigitalSurface.h.

template<typename TKSpace, typename TSurfelPredicate>
typedef TKSpace DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::KSpace

Definition at line 95 of file LightExplicitDigitalSurface.h.

template<typename TKSpace, typename TSurfelPredicate>
typedef SurfelNeighborhood<KSpace> DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Neighborhood

Definition at line 96 of file LightExplicitDigitalSurface.h.

template<typename TKSpace, typename TSurfelPredicate>
typedef Tracker DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Self

Definition at line 89 of file LightExplicitDigitalSurface.h.

template<typename TKSpace, typename TSurfelPredicate>
typedef TKSpace::SCell DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Surfel

Definition at line 92 of file LightExplicitDigitalSurface.h.


Constructor & Destructor Documentation

template<typename TKSpace , typename TSurfelPredicate >
DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker ( const DigitalSurfaceContainer aSurface,
const Surfel s 
)
inline
template<typename TKSpace , typename TSurfelPredicate >
DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker ( const Tracker other)
inline

Copy constructor.

Parameters:
otherthe object to clone.

Definition at line 64 of file LightExplicitDigitalSurface.ih.

: mySurface( other.mySurface ), myNeighborhood( other.myNeighborhood )
{
}
template<typename TKSpace , typename TSurfelPredicate >
DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::~Tracker ( )
inline

Destructor.

Definition at line 46 of file LightExplicitDigitalSurface.ih.

{}

Member Function Documentation

template<typename TKSpace , typename TSurfelPredicate >
DGtal::uint8_t DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::adjacent ( Surfel s,
Dimension  d,
bool  pos 
) const
inline

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.

Definition at line 112 of file LightExplicitDigitalSurface.ih.

References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelPredicate().

Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::degree(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::writeNeighbors().

{
return static_cast<uint8_t>
( s, surface().surfelPredicate(), d, pos ) );
}
template<typename TKSpace , typename TSurfelPredicate >
const DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Surfel & DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::current ( ) const
inline
Returns:
the current surfel on which the tracker is.

Definition at line 84 of file LightExplicitDigitalSurface.ih.

References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfel().

{
}
template<typename TKSpace , typename TSurfelPredicate >
void DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::move ( const Surfel s)
inline

Moves the tracker to the given valid surfel.

Precondition:
'surface().isInside( s )'
Parameters:
sthe surfel on which the tracker is moved.

Definition at line 102 of file LightExplicitDigitalSurface.ih.

References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::isInside().

Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::degree(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::writeNeighbors().

{
ASSERT( surface().isInside( s ) );
}
template<typename TKSpace , typename TSurfelPredicate >
DGtal::Dimension DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::orthDir ( ) const
inline
Returns:
the orthogonal direction to the current surfel.

Definition at line 93 of file LightExplicitDigitalSurface.ih.

{
}
template<typename TKSpace , typename TSurfelPredicate >
const DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::DigitalSurfaceContainer & DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::surface ( ) const
inline
Returns:
the surface container that the Tracker is tracking.

Definition at line 74 of file LightExplicitDigitalSurface.ih.

Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker().

{
return mySurface;
}

Field Documentation

template<typename TKSpace, typename TSurfelPredicate>
Neighborhood DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::myNeighborhood
private

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

Definition at line 156 of file LightExplicitDigitalSurface.h.

Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker().

template<typename TKSpace, typename TSurfelPredicate>
const DigitalSurfaceContainer& DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::mySurface
private

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

Definition at line 153 of file LightExplicitDigitalSurface.h.


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