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

#include <DGtal/topology/ImplicitDigitalSurface.h>

Collaboration diagram for DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >:
[legend]

Data Structures

class  Tracker
 

Public Types

typedef ImplicitDigitalSurface< TKSpace, TPointPredicate > Self
 
typedef TKSpace KSpace
 
typedef KSpace::SCell Surfel
 
typedef KSpace::Size Size
 
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::dimension > Adjacency
 
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
 
AdjacencysurfelAdjacency ()
 
const PointPredicatepointPredicate () 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 (const Surfel &p, bool closed)
 

Private Member Functions

ImplicitDigitalSurfaceoperator= (const ImplicitDigitalSurface &other)
 

Private Attributes

const KSpacemyKSpace
 
const PointPredicatemyPointPredicate
 
Adjacency mySurfelAdjacency
 
SurfelStorage mySurfels
 

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

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

Definition at line 177 of file ImplicitDigitalSurface.h.

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

Definition at line 178 of file ImplicitDigitalSurface.h.

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

Definition at line 180 of file ImplicitDigitalSurface.h.

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

Definition at line 173 of file ImplicitDigitalSurface.h.

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.

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

Definition at line 172 of file ImplicitDigitalSurface.h.

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

Definition at line 163 of file ImplicitDigitalSurface.h.

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

Definition at line 179 of file ImplicitDigitalSurface.h.

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

Definition at line 181 of file ImplicitDigitalSurface.h.

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

Definition at line 155 of file ImplicitDigitalSurface.h.

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.

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

Definition at line 171 of file ImplicitDigitalSurface.h.

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

Type for surfels.

Definition at line 159 of file ImplicitDigitalSurface.h.

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

Definition at line 170 of file ImplicitDigitalSurface.h.

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

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

Destructor.

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.

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

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).
template<typename TKSpace, typename TPointPredicate>
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT ( (concepts::CCellularGridSpaceND< KSpace >)  )
template<typename TKSpace, typename TPointPredicate>
DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT ( (concepts::CPointPredicate< PointPredicate >)  )
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.
template<typename TKSpace, typename TPointPredicate>
Connectedness DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::connectedness ( ) const
Returns
the connectedness of this surface. Either CONNECTED, DISCONNECTED, or UNKNOWN.
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.
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).
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.
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.
template<typename TKSpace, typename TPointPredicate>
Size DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::nbSurfels ( ) const
Returns
the number of surfels of this digital surface. NB: O(1)
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.
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.
template<typename TKSpace, typename TPointPredicate>
const PointPredicate& DGtal::ImplicitDigitalSurface< TKSpace, TPointPredicate >::pointPredicate ( ) const

accessor to point predicate.

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

accessor to surfel adjacency.

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

mutator to surfel adjacency.

Field Documentation

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.

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.

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.

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: