DGtal
1.5.beta
|
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels. The shape is determined by a predicate telling whether a given surfel belongs or not to the shape boundary. Compute once the boundary of the surface with a tracking. More...
#include <DGtal/topology/ExplicitDigitalSurface.h>
Data Structures | |
class | Tracker |
Public Types | |
typedef ExplicitDigitalSurface< TKSpace, TSurfelPredicate > | 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 TSurfelPredicate | SurfelPredicate |
typedef std::vector< Surfel > | SurfelStorage |
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::CSurfelPredicate< SurfelPredicate >)) | |
~ExplicitDigitalSurface () | |
ExplicitDigitalSurface (const ExplicitDigitalSurface &other) | |
ExplicitDigitalSurface (ConstAlias< KSpace > aKSpace, const SurfelPredicate &aSP, const Adjacency &adj, const Surfel &s, bool closed=false) | |
const Adjacency & | surfelAdjacency () const |
accessor to surfel adjacency. More... | |
Adjacency & | surfelAdjacency () |
mutator to surfel adjacency. More... | |
const SurfelPredicate & | surfelPredicate () const |
accessor to point predicate. More... | |
const KSpace & | space () const |
bool | isInside (const Surfel &s) const |
SurfelConstIterator | begin () const |
SurfelConstIterator | end () const |
Size | nbSurfels () const |
bool | empty () const |
DigitalSurfaceTracker * | newTracker (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 | |
ExplicitDigitalSurface & | operator= (const ExplicitDigitalSurface &other) |
Private Attributes | |
const KSpace & | myKSpace |
a reference to the cellular space. More... | |
const SurfelPredicate & | mySurfelPredicate |
a reference to the surfel 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... | |
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as connected surfels. The shape is determined by a predicate telling whether a given surfel belongs or not to the shape boundary. Compute once the boundary of the surface with a tracking.
Description of template class 'ExplicitDigitalSurface'
Note that in the 2D case, this object corresponds to a digital contour made of linels, ordered as a direct orientation sequence. If the contour is open, then begin() returns one extremity while end() is the surfel past the last extremity. If the contour is closed, then begin() is the surfel given at the instantiation of the object.
TKSpace | a model of CCellularGridSpaceND: the type chosen for the cellular grid space. |
TSurfelPredicate | a model of CSurfelPredicate: this functor defines the digital surface as a characteristic function returning true iff the surfel belongs to it. |
Definition at line 81 of file ExplicitDigitalSurface.h.
typedef SurfelAdjacency<KSpace::dimension> DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Adjacency |
Definition at line 187 of file ExplicitDigitalSurface.h.
typedef KSpace::Cell DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Cell |
Definition at line 188 of file ExplicitDigitalSurface.h.
typedef KSpace::CellSet DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::CellSet |
Definition at line 190 of file ExplicitDigitalSurface.h.
typedef Tracker DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::DigitalSurfaceTracker |
Definition at line 183 of file ExplicitDigitalSurface.h.
typedef TKSpace DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::KSpace |
Model of cellular grid space.
Definition at line 167 of file ExplicitDigitalSurface.h.
typedef KSpace::Point DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Point |
Definition at line 182 of file ExplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SCell |
Definition at line 189 of file ExplicitDigitalSurface.h.
typedef KSpace::SCellSet DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SCellSet |
Definition at line 191 of file ExplicitDigitalSurface.h.
typedef ExplicitDigitalSurface<TKSpace,TSurfelPredicate> DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Self |
Definition at line 165 of file ExplicitDigitalSurface.h.
typedef KSpace::Size DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Size |
Type for sizes (unsigned integral type).
Definition at line 171 of file ExplicitDigitalSurface.h.
typedef KSpace::Space DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Space |
Definition at line 181 of file ExplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Surfel |
Type for surfels.
Definition at line 169 of file ExplicitDigitalSurface.h.
typedef SurfelStorage::const_iterator DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelConstIterator |
Definition at line 180 of file ExplicitDigitalSurface.h.
typedef TSurfelPredicate DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelPredicate |
Definition at line 173 of file ExplicitDigitalSurface.h.
typedef std::vector<Surfel> DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelStorage |
Definition at line 179 of file ExplicitDigitalSurface.h.
DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::~ExplicitDigitalSurface | ( | ) |
Destructor.
DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::ExplicitDigitalSurface | ( | const ExplicitDigitalSurface< TKSpace, TSurfelPredicate > & | other | ) |
Copy constructor.
other | the 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.
DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::ExplicitDigitalSurface | ( | ConstAlias< KSpace > | aKSpace, |
const SurfelPredicate & | aSP, | ||
const Adjacency & | adj, | ||
const Surfel & | s, | ||
bool | closed = false |
||
) |
Constructor from digital set.
aKSpace | a cellular grid space (referenced). |
aSP | a surfel predicate defining the shape (referenced). |
adj | the surfel adjacency (for instance Adjacency( true ) is interior to exterior adjacency ). |
s | any surfel of aKSpace such that aSP is true in the interior and false in the exterior. |
closed | when '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.
SurfelConstIterator DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::begin | ( | ) | const |
DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::BOOST_CONCEPT_ASSERT | ( | (concepts::CSurfelPredicate< SurfelPredicate >) | ) |
|
protected |
Recomputes the set of boundary surfels from the point predicate and some initial surfel.
p | any surfel of the surface |
closed | when 'true', the surface is known to be closed, hence faster extraction can be performed. |
Connectedness DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::connectedness | ( | ) | const |
bool DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::empty | ( | ) | const |
SurfelConstIterator DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::end | ( | ) | const |
bool DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::isInside | ( | const Surfel & | s | ) | const |
s | any surfel of the space. |
bool DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Size DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::nbSurfels | ( | ) | const |
DigitalSurfaceTracker* DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::newTracker | ( | const Surfel & | s | ) | const |
s | any surfel of the space. |
|
private |
Assignment.
other | the object to copy. |
void DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
const KSpace& DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::space | ( | ) | const |
Adjacency& DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelAdjacency | ( | ) |
mutator to surfel adjacency.
const Adjacency& DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelAdjacency | ( | ) | const |
accessor to surfel adjacency.
const SurfelPredicate& DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelPredicate | ( | ) | const |
accessor to point predicate.
|
private |
a reference to the cellular space.
Definition at line 302 of file ExplicitDigitalSurface.h.
|
private |
the surfel adjacency used to determine neighbors.
Definition at line 306 of file ExplicitDigitalSurface.h.
|
private |
a reference to the surfel predicate defining the shape.
Definition at line 304 of file ExplicitDigitalSurface.h.
|
private |
a vector storing all the surfels of the boundary.
Definition at line 308 of file ExplicitDigitalSurface.h.