DGtal 1.3.0
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate > Class Template Reference

Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an implicitly define shape. Compute once the boundary of the surface with a tracking. More...

#include <DGtal/topology/ImplicitDigitalSurface.h>

Data Structures

class  Tracker
 

Public Types

typedef ImplicitDigitalSurface< TKSpace, TPointPredicate > Self
 
typedef TKSpace KSpace
 Model of cellular grid space. More...
 
typedef KSpace::SCell Surfel
 Type for surfels. More...
 
typedef KSpace::Size Size
 Type for sizes (unsigned integral type). More...
 
typedef TPointPredicate PointPredicate
 
typedef std::vector< SurfelSurfelStorage
 
typedef SurfelStorage::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
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CCellularGridSpaceND< KSpace >))
 
 BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< PointPredicate >))
 
 ~ImplicitDigitalSurface ()
 
 ImplicitDigitalSurface (const ImplicitDigitalSurface &other)
 
 ImplicitDigitalSurface (ConstAlias< KSpace > aKSpace, ConstAlias< PointPredicate > aPP, const Adjacency &adj, const Surfel &s, bool closed=false)
 
const AdjacencysurfelAdjacency () const
 accessor to surfel adjacency. More...
 
AdjacencysurfelAdjacency ()
 mutator to surfel adjacency. More...
 
const PointPredicatepointPredicate () const
 accessor to point predicate. More...
 
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 (const Surfel &p, bool closed)
 

Private Member Functions

ImplicitDigitalSurfaceoperator= (const ImplicitDigitalSurface &other)
 

Private Attributes

const KSpacemyKSpace
 a reference to the cellular space. More...
 
const PointPredicatemyPointPredicate
 a reference to the point predicate defining the shape. More...
 
Adjacency mySurfelAdjacency
 the surfel adjacency used to determine neighbors. More...
 
SurfelStorage mySurfels
 a vector storing all the surfels of the boundary. More...
 

Detailed Description

template<typename TKSpace, typename TPointPredicate>
class DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >

Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an implicitly define shape. Compute once the boundary of the surface with a tracking.

Description of template class 'ImplicitDigitalSurface'

Template Parameters
TKSpacea model of CCellularGridSpaceND: the type chosen for the cellular grid space.
TPointPredicatea model of concepts::CPointPredicate: this functor defines the inside of a shape on points where it is true.
Examples
examples/tutorial-examples/polyhedralizer.cpp, geometry/surfaces/dvcm-3d.cpp, and tutorial-examples/polyhedralizer.cpp.

Definition at line 71 of file ImplicitDigitalSurface.h.

Member Typedef Documentation

◆ Adjacency

template<typename TKSpace , typename TPointPredicate >
typedef SurfelAdjacency<KSpace::dimension> DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Adjacency

Definition at line 177 of file ImplicitDigitalSurface.h.

◆ Cell

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::Cell DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Cell

Definition at line 178 of file ImplicitDigitalSurface.h.

◆ CellSet

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::CellSet DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::CellSet

Definition at line 180 of file ImplicitDigitalSurface.h.

◆ DigitalSurfaceTracker

template<typename TKSpace , typename TPointPredicate >
typedef Tracker DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::DigitalSurfaceTracker

Definition at line 173 of file ImplicitDigitalSurface.h.

◆ KSpace

template<typename TKSpace , typename TPointPredicate >
typedef TKSpace DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::KSpace

Model of cellular grid space.

Definition at line 157 of file ImplicitDigitalSurface.h.

◆ Point

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::Point DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Point

Definition at line 172 of file ImplicitDigitalSurface.h.

◆ PointPredicate

template<typename TKSpace , typename TPointPredicate >
typedef TPointPredicate DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::PointPredicate

Definition at line 163 of file ImplicitDigitalSurface.h.

◆ SCell

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::SCell DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::SCell

Definition at line 179 of file ImplicitDigitalSurface.h.

◆ SCellSet

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::SCellSet DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::SCellSet

Definition at line 181 of file ImplicitDigitalSurface.h.

◆ Self

template<typename TKSpace , typename TPointPredicate >
typedef ImplicitDigitalSurface<TKSpace,TPointPredicate> DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Self

Definition at line 155 of file ImplicitDigitalSurface.h.

◆ Size

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::Size DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Size

Type for sizes (unsigned integral type).

Definition at line 161 of file ImplicitDigitalSurface.h.

◆ Space

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::Space DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Space

Definition at line 171 of file ImplicitDigitalSurface.h.

◆ Surfel

template<typename TKSpace , typename TPointPredicate >
typedef KSpace::SCell DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::Surfel

Type for surfels.

Definition at line 159 of file ImplicitDigitalSurface.h.

◆ SurfelConstIterator

template<typename TKSpace , typename TPointPredicate >
typedef SurfelStorage::const_iterator DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::SurfelConstIterator

Definition at line 170 of file ImplicitDigitalSurface.h.

◆ SurfelStorage

template<typename TKSpace , typename TPointPredicate >
typedef std::vector<Surfel> DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::SurfelStorage

Definition at line 169 of file ImplicitDigitalSurface.h.

Constructor & Destructor Documentation

◆ ~ImplicitDigitalSurface()

template<typename TKSpace , typename TPointPredicate >
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::~ImplicitDigitalSurface ( )

Destructor.

◆ ImplicitDigitalSurface() [1/2]

template<typename TKSpace , typename TPointPredicate >
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::ImplicitDigitalSurface ( const ImplicitDigitalSurface< TKSpace, TPointPredicate > &  other)

Copy constructor.

Parameters
otherthe object to clone.

NB: O(N) computational complexity operation, where N is the number of surfels of the surface. This is due to the fact that the surface is stored explicitly.

◆ ImplicitDigitalSurface() [2/2]

template<typename TKSpace , typename TPointPredicate >
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::ImplicitDigitalSurface ( ConstAlias< KSpace aKSpace,
ConstAlias< PointPredicate aPP,
const Adjacency adj,
const Surfel s,
bool  closed = false 
)

Constructor from digital set.

Parameters
aKSpacea cellular grid space (referenced).
aPPa point predicate defining implicitly the shape (referenced).
adjthe surfel adjacency (for instance Adjacency( true ) is interior to exterior adjacency ).
sany surfel of aKSpace such that aPP is true in the interior and false in the exterior.
closedwhen 'true', the surface is known to be closed, hence faster extraction can be performed, default is 'false'.

NB: O(N) computational complexity operation, where N is the number of surfels of the surface. This is due to the fact that, at construction, the surface is extracted and stored.

See also
computeSurfels

Member Function Documentation

◆ begin()

template<typename TKSpace , typename TPointPredicate >
SurfelConstIterator DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::begin ( ) const
Returns
an iterator pointing on the first surfel of the digital surface (unspecified order).

◆ BOOST_CONCEPT_ASSERT() [1/2]

template<typename TKSpace , typename TPointPredicate >
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< KSpace >)  )

◆ BOOST_CONCEPT_ASSERT() [2/2]

template<typename TKSpace , typename TPointPredicate >
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT ( (concepts::CPointPredicate< PointPredicate >)  )

◆ computeSurfels()

template<typename TKSpace , typename TPointPredicate >
void DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::computeSurfels ( const Surfel p,
bool  closed 
)
protected

Recomputes the set of boundary surfels from the point predicate and some initial surfel.

Parameters
pany surfel of the surface
closedwhen 'true', the surface is known to be closed, hence faster extraction can be performed.

◆ connectedness()

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

◆ empty()

template<typename TKSpace , typename TPointPredicate >
bool DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::empty ( ) const
Returns
'true' is the surface has no surfels, 'false' otherwise. NB: O(1) operation.

◆ end()

template<typename TKSpace , typename TPointPredicate >
SurfelConstIterator DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::end ( ) const
Returns
an iterator after the last surfel of the digital surface (unspecified order).

◆ isInside()

template<typename TKSpace , typename TPointPredicate >
bool DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::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 TPointPredicate >
bool DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.

◆ nbSurfels()

template<typename TKSpace , typename TPointPredicate >
Size DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::nbSurfels ( ) const
Returns
the number of surfels of this digital surface. NB: O(1)

◆ newTracker()

template<typename TKSpace , typename TPointPredicate >
DigitalSurfaceTracker * DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::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 TPointPredicate >
ImplicitDigitalSurface & DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::operator= ( const ImplicitDigitalSurface< TKSpace, TPointPredicate > &  other)
private

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'. Forbidden by default.

◆ pointPredicate()

template<typename TKSpace , typename TPointPredicate >
const PointPredicate & DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::pointPredicate ( ) const

accessor to point predicate.

◆ selfDisplay()

template<typename TKSpace , typename TPointPredicate >
void DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::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 TPointPredicate >
const KSpace & DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::space ( ) const
Returns
the cellular space in which lives the surface.

◆ surfelAdjacency() [1/2]

template<typename TKSpace , typename TPointPredicate >
Adjacency & DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::surfelAdjacency ( )

mutator to surfel adjacency.

◆ surfelAdjacency() [2/2]

template<typename TKSpace , typename TPointPredicate >
const Adjacency & DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::surfelAdjacency ( ) const

accessor to surfel adjacency.

Field Documentation

◆ myKSpace

template<typename TKSpace , typename TPointPredicate >
const KSpace& DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::myKSpace
private

a reference to the cellular space.

Definition at line 293 of file ImplicitDigitalSurface.h.

◆ myPointPredicate

template<typename TKSpace , typename TPointPredicate >
const PointPredicate& DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::myPointPredicate
private

a reference to the point predicate defining the shape.

Definition at line 295 of file ImplicitDigitalSurface.h.

◆ mySurfelAdjacency

template<typename TKSpace , typename TPointPredicate >
Adjacency DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::mySurfelAdjacency
private

the surfel adjacency used to determine neighbors.

Definition at line 297 of file ImplicitDigitalSurface.h.

◆ mySurfels

template<typename TKSpace , typename TPointPredicate >
SurfelStorage DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::mySurfels
private

a vector storing all the surfels of the boundary.

Definition at line 299 of file ImplicitDigitalSurface.h.


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