DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::SetOfSurfels< TKSpace, TSurfelSet > Class Template Reference

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. More...

#include <DGtal/topology/SetOfSurfels.h>

Data Structures

class  Tracker
 

Public Types

typedef SetOfSurfels< TKSpace, TSurfelSet > Self
 
typedef TKSpace KSpace
 Model of cellular grid space.
 
typedef KSpace::SCell Surfel
 Type for surfels.
 
typedef KSpace::Size Size
 Type for sizes (unsigned integral type).
 
typedef TSurfelSet SurfelSet
 
typedef SurfelSet::const_iterator SurfelConstIterator
 
typedef KSpace::Space Space
 
typedef KSpace::Point Point
 
typedef Tracker DigitalSurfaceTracker
 
typedef SurfelAdjacency< KSpace::dimensionAdjacency
 
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
 accessor to surfel adjacency.
 
AdjacencysurfelAdjacency ()
 mutator to surfel adjacency.
 
const SurfelPredicatesurfelPredicate () const
 accessor to surfel predicate.
 
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
 a reference to the cellular space.
 
SurfelSet mySurfelSet
 the set of surfels
 
SurfelPredicate mySurfelPredicate
 the surfel predicate defining the shape (related to mySurfelSet).
 
Adjacency mySurfelAdjacency
 the surfel adjacency used to determine neighbors.
 

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
dec/exampleHeatLaplace.cpp, geometry/curves/exampleGridCurve3d-2.cpp, geometry/surfaces/dvcm-2d-curvature.cpp, shapes/viewMarchingCubes.cpp, shapes/viewPolygonalMarchingCubes.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

◆ Adjacency

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.

◆ Cell

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

Definition at line 178 of file SetOfSurfels.h.

◆ CellSet

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

Definition at line 180 of file SetOfSurfels.h.

◆ DigitalSurfaceTracker

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

Definition at line 173 of file SetOfSurfels.h.

◆ KSpace

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.

◆ Point

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

Definition at line 172 of file SetOfSurfels.h.

◆ SCell

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

Definition at line 179 of file SetOfSurfels.h.

◆ SCellSet

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

Definition at line 181 of file SetOfSurfels.h.

◆ Self

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.

◆ Size

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.

◆ Space

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

Definition at line 171 of file SetOfSurfels.h.

◆ Surfel

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.

◆ SurfelConstIterator

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.

◆ SurfelPredicate

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.

◆ SurfelSet

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

◆ ~SetOfSurfels()

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

Destructor.

◆ SetOfSurfels() [1/2]

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.

◆ SetOfSurfels() [2/2]

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

◆ begin()

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).

◆ connectedness()

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.

◆ empty()

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.

◆ end()

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).

◆ isInside()

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.

◆ isValid()

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.

◆ nbSurfels()

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)

◆ newTracker()

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.

◆ operator=()

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.

◆ selfDisplay()

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.

◆ space()

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.

◆ surfelAdjacency() [1/2]

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

mutator to surfel adjacency.

◆ surfelAdjacency() [2/2]

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

accessor to surfel adjacency.

◆ surfelPredicate()

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

accessor to surfel predicate.

◆ surfelSet() [1/2]

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

◆ surfelSet() [2/2]

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

Field Documentation

◆ myKSpace

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.

◆ mySurfelAdjacency

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.

◆ mySurfelPredicate

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.

◆ mySurfelSet

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: