DGtal  0.9.4beta
Data Structures | Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::SetOfSurfels< TKSpace, TSurfelSet > Class Template Reference

#include <DGtal/topology/SetOfSurfels.h>

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

Data Structures

class  Tracker
 

Public Types

typedef SetOfSurfels< TKSpace, TSurfelSet > Self
 
typedef TKSpace KSpace
 
typedef KSpace::SCell Surfel
 
typedef KSpace::Size Size
 
typedef TSurfelSet SurfelSet
 
typedef SurfelSet::const_iterator SurfelConstIterator
 
typedef KSpace::Space Space
 
typedef KSpace::Point Point
 
typedef Tracker DigitalSurfaceTracker
 
typedef SurfelAdjacency< KSpace::dimension > Adjacency
 
typedef KSpace::Cell Cell
 
typedef KSpace::SCell SCell
 
typedef KSpace::CellSet CellSet
 
typedef KSpace::SCellSet SCellSet
 
typedef functors::SurfelSetPredicate< SurfelSet, SurfelSurfelPredicate
 

Public Member Functions

 ~SetOfSurfels ()
 
 SetOfSurfels (const SetOfSurfels &other)
 
 SetOfSurfels (ConstAlias< KSpace > aKSpace, const Adjacency &adj, SurfelSet aSetOfSurfels=SurfelSet())
 
SurfelSetsurfelSet ()
 
const SurfelSetsurfelSet () const
 
const AdjacencysurfelAdjacency () const
 
AdjacencysurfelAdjacency ()
 
const SurfelPredicatesurfelPredicate () 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
 

Private Member Functions

SetOfSurfelsoperator= (const SetOfSurfels &other)
 

Private Attributes

const KSpacemyKSpace
 
SurfelSet mySurfelSet
 
SurfelPredicate mySurfelPredicate
 
Adjacency mySurfelAdjacency
 

Detailed Description

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

Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels. The shape is determined by the set of surfels that composed the surface. The set of surfels is stored in this container.

Description of template class 'SetOfSurfels'

Template Parameters
TKSpacea model of CCellularGridSpaceND: the type chosen for the cellular grid space.
TSurfelSeta model of CSurfelSet: the type chosen for representing the set of surfels in the space.
Examples:
geometry/curves/exampleGridCurve3d-2.cpp, geometry/surfaces/dvcm-2d-curvature.cpp, topology/digitalSurfaceSlice.cpp, topology/trackImplicitPolynomialSurfaceToOFF.cpp, topology/volMarchingCubes.cpp, and topology/volToOFF.cpp.

Definition at line 73 of file SetOfSurfels.h.

Member Typedef Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef SurfelAdjacency<KSpace::dimension> DGtal::SetOfSurfels< TKSpace, TSurfelSet >::Adjacency

Definition at line 177 of file SetOfSurfels.h.

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

Definition at line 178 of file SetOfSurfels.h.

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

Definition at line 180 of file SetOfSurfels.h.

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

Definition at line 173 of file SetOfSurfels.h.

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

Model of cellular grid space.

Definition at line 158 of file SetOfSurfels.h.

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

Definition at line 172 of file SetOfSurfels.h.

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

Definition at line 179 of file SetOfSurfels.h.

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

Definition at line 181 of file SetOfSurfels.h.

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

Definition at line 156 of file SetOfSurfels.h.

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

Type for sizes (unsigned integral type).

Definition at line 162 of file SetOfSurfels.h.

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

Definition at line 171 of file SetOfSurfels.h.

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

Type for surfels.

Definition at line 160 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef SurfelSet::const_iterator DGtal::SetOfSurfels< TKSpace, TSurfelSet >::SurfelConstIterator

Definition at line 170 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
typedef functors::SurfelSetPredicate<SurfelSet, Surfel> DGtal::SetOfSurfels< TKSpace, TSurfelSet >::SurfelPredicate

Definition at line 182 of file SetOfSurfels.h.

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

Definition at line 164 of file SetOfSurfels.h.

Constructor & Destructor Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::~SetOfSurfels ( )

Destructor.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::SetOfSurfels ( const SetOfSurfels< TKSpace, TSurfelSet > &  other)

Copy constructor.

Parameters
otherthe object to clone.

NB: Complexity depends on the type chosen for SurfelSet.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DGtal::SetOfSurfels< TKSpace, TSurfelSet >::SetOfSurfels ( ConstAlias< KSpace aKSpace,
const Adjacency adj,
SurfelSet  aSetOfSurfels = SurfelSet() 
)

Constructor from digital set.

Parameters
aKSpacea cellular grid space (referenced).
adjthe surfel adjacency (for instance Adjacency( true ) is interior to exterior adjacency ).
aSetOfSurfelsany set of surfels that is cloned in this object (default is empty)

NB: Complexity depends on the type chosen for SurfelSet.

Member Function Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
SurfelConstIterator DGtal::SetOfSurfels< TKSpace, TSurfelSet >::begin ( ) const
Returns
an iterator pointing on the first surfel of the digital surface (unspecified order).
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
Connectedness DGtal::SetOfSurfels< TKSpace, TSurfelSet >::connectedness ( ) const
Returns
the connectedness of this surface. Either CONNECTED, DISCONNECTED, or UNKNOWN.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
bool DGtal::SetOfSurfels< TKSpace, TSurfelSet >::empty ( ) const
Returns
'true' is the surface has no surfels, 'false' otherwise. NB: O(1) operation.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
SurfelConstIterator DGtal::SetOfSurfels< TKSpace, TSurfelSet >::end ( ) const
Returns
an iterator after the last surfel of the digital surface (unspecified order).
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
bool DGtal::SetOfSurfels< TKSpace, TSurfelSet >::isInside ( const Surfel s) const
Parameters
sany surfel of the space.
Returns
'true' if s belongs to this digital surface.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
bool DGtal::SetOfSurfels< TKSpace, TSurfelSet >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
Size DGtal::SetOfSurfels< TKSpace, TSurfelSet >::nbSurfels ( ) const
Returns
the number of surfels of this digital surface. NB: O(1)
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
DigitalSurfaceTracker* DGtal::SetOfSurfels< TKSpace, TSurfelSet >::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 TSurfelSet = typename TKSpace::SurfelSet>
SetOfSurfels& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::operator= ( const SetOfSurfels< TKSpace, TSurfelSet > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
void DGtal::SetOfSurfels< TKSpace, TSurfelSet >::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 TSurfelSet = typename TKSpace::SurfelSet>
const KSpace& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::space ( ) const
Returns
the cellular space in which lives the surface.
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const Adjacency& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::surfelAdjacency ( ) const

accessor to surfel adjacency.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
Adjacency& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::surfelAdjacency ( )

mutator to surfel adjacency.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const SurfelPredicate& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::surfelPredicate ( ) const

accessor to surfel predicate.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
SurfelSet& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::surfelSet ( )
template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const SurfelSet& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::surfelSet ( ) const

Field Documentation

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
const KSpace& DGtal::SetOfSurfels< TKSpace, TSurfelSet >::myKSpace
private

a reference to the cellular space.

Definition at line 288 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
Adjacency DGtal::SetOfSurfels< TKSpace, TSurfelSet >::mySurfelAdjacency
private

the surfel adjacency used to determine neighbors.

Definition at line 294 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
SurfelPredicate DGtal::SetOfSurfels< TKSpace, TSurfelSet >::mySurfelPredicate
private

the surfel predicate defining the shape (related to mySurfelSet).

Definition at line 292 of file SetOfSurfels.h.

template<typename TKSpace, typename TSurfelSet = typename TKSpace::SurfelSet>
SurfelSet DGtal::SetOfSurfels< TKSpace, TSurfelSet >::mySurfelSet
private

the set of surfels

Definition at line 290 of file SetOfSurfels.h.


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