DGtal  0.9.3beta
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DGtal::DigitalSetBoundary< TKSpace, TDigitalSet > Class Template Reference

#include <DGtal/topology/DigitalSetBoundary.h>

Collaboration diagram for DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >:
[legend]

Data Structures

class  Tracker
 

Public Types

typedef DigitalSetBoundary< TKSpace, TDigitalSet > Self
 
typedef TKSpace KSpace
 
typedef KSpace::SCell Surfel
 
typedef KSpace::Size Size
 
typedef TDigitalSet DigitalSet
 
typedef std::vector< SurfelSurfelStorage
 
typedef SurfelStorage::const_iterator SurfelConstIterator
 
typedef KSpace::Space Space
 
typedef DigitalSet::Domain Domain
 
typedef DigitalSet::Point Point
 
typedef Tracker DigitalSurfaceTracker
 
typedef SurfelAdjacency< KSpace::dimension > Adjacency
 
typedef KSpace::Cell Cell
 
typedef KSpace::SCell SCell
 

Public Member Functions

 ~DigitalSetBoundary ()
 
 DigitalSetBoundary (const DigitalSetBoundary &other)
 
 DigitalSetBoundary (ConstAlias< KSpace > aKSpace, const DigitalSet &aSet, const Adjacency &adj=Adjacency(true))
 
const AdjacencysurfelAdjacency () const
 
AdjacencysurfelAdjacency ()
 
const DigitalSetdigitalSet () const
 
const KSpacespace () const
 
bool isInside (const Surfel &s) const
 
SurfelConstIterator begin () const
 
SurfelConstIterator end () const
 
Size nbSurfels () const
 
bool empty () const
 
DigitalSurfaceTrackernewTracker (const Surfel &s) const
 
Connectedness connectedness () const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 

Protected Member Functions

void computeSurfels ()
 

Private Member Functions

DigitalSetBoundaryoperator= (const DigitalSetBoundary &other)
 

Private Attributes

const KSpacemyKSpace
 
DigitalSet myDigitalSet
 
Adjacency mySurfelAdjacency
 
SurfelStorage mySurfels
 

Detailed Description

template<typename TKSpace, typename TDigitalSet>
class DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >

Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of a given digital set.

Description of template class 'DigitalSetBoundary'

Template Parameters
TKSpacea model of CCellularGridSpaceND: the type chosen for the cellular grid space.
TDigitalSeta model of CDigitalSet: the type chosen for the set of digital points.
Examples:
geometry/surfaces/greedy-plane-segmentation-ex2.cpp, geometry/surfaces/greedy-plane-segmentation.cpp, geometry/tools/exampleAlphaShape.cpp, graph/volDistanceTraversal.cpp, and topology/volBreadthFirstTraversal.cpp.

Definition at line 69 of file DigitalSetBoundary.h.

Member Typedef Documentation

template<typename TKSpace, typename TDigitalSet>
typedef SurfelAdjacency<KSpace::dimension> DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Adjacency

Definition at line 166 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef KSpace::Cell DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Cell

Definition at line 167 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef TDigitalSet DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::DigitalSet

Definition at line 156 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef Tracker DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::DigitalSurfaceTracker

Definition at line 162 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef DigitalSet::Domain DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Domain

Definition at line 160 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef TKSpace DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::KSpace

Definition at line 153 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef DigitalSet::Point DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Point

Definition at line 161 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef KSpace::SCell DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::SCell

Definition at line 168 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef DigitalSetBoundary<TKSpace,TDigitalSet> DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Self

Definition at line 152 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef KSpace::Size DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Size

Definition at line 155 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef KSpace::Space DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Space

Definition at line 159 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef KSpace::SCell DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::Surfel

Definition at line 154 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef SurfelStorage::const_iterator DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::SurfelConstIterator

Definition at line 158 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
typedef std::vector<Surfel> DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::SurfelStorage

Definition at line 157 of file DigitalSetBoundary.h.

Constructor & Destructor Documentation

template<typename TKSpace, typename TDigitalSet>
DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::~DigitalSetBoundary ( )

Destructor.

template<typename TKSpace, typename TDigitalSet>
DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::DigitalSetBoundary ( const DigitalSetBoundary< TKSpace, TDigitalSet > &  other)

Copy constructor.

Parameters
otherthe object to clone.
template<typename TKSpace, typename TDigitalSet>
DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::DigitalSetBoundary ( ConstAlias< KSpace aKSpace,
const DigitalSet aSet,
const Adjacency adj = Adjacency(true) 
)

Constructor from digital set.

Parameters
aKSpacea cellular grid space (referenced).
aSeta set of points that is duplicated in 'this'.
adjthe surfel adjacency (default is interior to exterior adjacency ).

Member Function Documentation

template<typename TKSpace, typename TDigitalSet>
SurfelConstIterator DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::begin ( ) const
Returns
an iterator pointing on the first surfel of the digital surface (unspecified order).
template<typename TKSpace, typename TDigitalSet>
void DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::computeSurfels ( )
protected

Recomputes the set of boundary surfels from the set of points.

template<typename TKSpace, typename TDigitalSet>
Connectedness DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::connectedness ( ) const
Returns
the connectedness of this surface. Either CONNECTED, DISCONNECTED, or UNKNOWN.
template<typename TKSpace, typename TDigitalSet>
const DigitalSet& DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::digitalSet ( ) const

accessor to digital set

template<typename TKSpace, typename TDigitalSet>
bool DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::empty ( ) const
Returns
'true' is the surface has no surfels, 'false' otherwise. NB: O(1) operation.
template<typename TKSpace, typename TDigitalSet>
SurfelConstIterator DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::end ( ) const
Returns
an iterator after the last surfel of the digital surface (unspecified order).
template<typename TKSpace, typename TDigitalSet>
bool DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::isInside ( const Surfel s) const
Parameters
sany surfel of the space.
Returns
'true' if s belongs to this digital surface.
template<typename TKSpace, typename TDigitalSet>
bool DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TKSpace, typename TDigitalSet>
Size DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::nbSurfels ( ) const
Returns
the number of surfels of this digital surface.
template<typename TKSpace, typename TDigitalSet>
DigitalSurfaceTracker* DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::newTracker ( const Surfel s) const
Parameters
sany surfel of the space.
Precondition
'isInside( s )'
Returns
a dyn. alloc. pointer on a tracker positionned at s.
template<typename TKSpace, typename TDigitalSet>
DigitalSetBoundary& DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::operator= ( const DigitalSetBoundary< TKSpace, TDigitalSet > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TKSpace, typename TDigitalSet>
void DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TKSpace, typename TDigitalSet>
const KSpace& DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::space ( ) const
Returns
the cellular space in which lives the surface.
template<typename TKSpace, typename TDigitalSet>
const Adjacency& DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::surfelAdjacency ( ) const

accessor to surfel adjacency.

template<typename TKSpace, typename TDigitalSet>
Adjacency& DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::surfelAdjacency ( )

mutator to surfel adjacency.

Field Documentation

template<typename TKSpace, typename TDigitalSet>
DigitalSet DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::myDigitalSet
private

a smart pointer to some digital set.

Definition at line 264 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
const KSpace& DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::myKSpace
private

a reference to the cellular space.

Definition at line 262 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
Adjacency DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::mySurfelAdjacency
private

the surfel adjacency used to determine neighbors.

Definition at line 266 of file DigitalSetBoundary.h.

template<typename TKSpace, typename TDigitalSet>
SurfelStorage DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::mySurfels
private

a vector storing all the surfels of the boundary.

Definition at line 268 of file DigitalSetBoundary.h.


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