DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::DigitalSetBoundary< TKSpace, TDigitalSet > Class Template Reference

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

#include <DGtal/topology/DigitalSetBoundary.h>

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::dimensionAdjacency
 
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
 accessor to surfel adjacency.
 
AdjacencysurfelAdjacency ()
 mutator to surfel adjacency.
 
const DigitalSetdigitalSet () const
 accessor to digital set
 
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
 a reference to the cellular space.
 
DigitalSet myDigitalSet
 a smart pointer to some digital set.
 
Adjacency mySurfelAdjacency
 the surfel adjacency used to determine neighbors.
 
SurfelStorage mySurfels
 a vector storing all the surfels of the boundary.
 

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, and geometry/tools/exampleAlphaShape.cpp.

Definition at line 69 of file DigitalSetBoundary.h.

Member Typedef Documentation

◆ Adjacency

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

Definition at line 166 of file DigitalSetBoundary.h.

◆ Cell

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

Definition at line 167 of file DigitalSetBoundary.h.

◆ DigitalSet

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

Definition at line 156 of file DigitalSetBoundary.h.

◆ DigitalSurfaceTracker

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

Definition at line 162 of file DigitalSetBoundary.h.

◆ Domain

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

Definition at line 160 of file DigitalSetBoundary.h.

◆ KSpace

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

Definition at line 153 of file DigitalSetBoundary.h.

◆ Point

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

Definition at line 161 of file DigitalSetBoundary.h.

◆ SCell

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

Definition at line 168 of file DigitalSetBoundary.h.

◆ Self

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

Definition at line 152 of file DigitalSetBoundary.h.

◆ Size

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

Definition at line 155 of file DigitalSetBoundary.h.

◆ Space

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

Definition at line 159 of file DigitalSetBoundary.h.

◆ Surfel

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

Definition at line 154 of file DigitalSetBoundary.h.

◆ SurfelConstIterator

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

Definition at line 158 of file DigitalSetBoundary.h.

◆ SurfelStorage

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

◆ ~DigitalSetBoundary()

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

Destructor.

◆ DigitalSetBoundary() [1/2]

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

Copy constructor.

Parameters
otherthe object to clone.

◆ DigitalSetBoundary() [2/2]

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

◆ begin()

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

◆ computeSurfels()

template<typename TKSpace , typename TDigitalSet >
void DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::computeSurfels ( )
protected

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

◆ connectedness()

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

◆ digitalSet()

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

accessor to digital set

◆ empty()

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.

◆ end()

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

◆ isInside()

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.

◆ isValid()

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.

◆ nbSurfels()

template<typename TKSpace , typename TDigitalSet >
Size DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::nbSurfels ( ) const
Returns
the number of surfels of this digital surface.

◆ newTracker()

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.

◆ operator=()

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.

◆ selfDisplay()

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.

◆ space()

template<typename TKSpace , typename TDigitalSet >
const KSpace & DGtal::DigitalSetBoundary< TKSpace, TDigitalSet >::space ( ) const
Returns
the cellular space in which lives the surface.

◆ surfelAdjacency() [1/2]

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

mutator to surfel adjacency.

◆ surfelAdjacency() [2/2]

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

accessor to surfel adjacency.

Field Documentation

◆ myDigitalSet

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.

◆ myKSpace

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.

◆ mySurfelAdjacency

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.

◆ mySurfels

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: