DGtal
0.6.devel
|
#include <ExplicitDigitalSurface.h>
Data Structures | |
class | Tracker |
Public Types | |
typedef ExplicitDigitalSurface < TKSpace, TSurfelPredicate > | Self |
typedef TKSpace | KSpace |
typedef KSpace::SCell | Surfel |
typedef KSpace::Size | Size |
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 ((CSurfelPredicate< SurfelPredicate >)) | |
~ExplicitDigitalSurface () | |
ExplicitDigitalSurface (const ExplicitDigitalSurface &other) | |
ExplicitDigitalSurface (const KSpace &aKSpace, const SurfelPredicate &aSP, const Adjacency &adj, const Surfel &s, bool closed=false) | |
const Adjacency & | surfelAdjacency () const |
Adjacency & | surfelAdjacency () |
const SurfelPredicate & | surfelPredicate () const |
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 |
const SurfelPredicate & | mySurfelPredicate |
Adjacency | mySurfelAdjacency |
SurfelStorage | mySurfels |
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 80 of file ExplicitDigitalSurface.h.
typedef SurfelAdjacency<KSpace::dimension> DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Adjacency |
Definition at line 186 of file ExplicitDigitalSurface.h.
typedef KSpace::Cell DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Cell |
Definition at line 187 of file ExplicitDigitalSurface.h.
typedef KSpace::CellSet DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::CellSet |
Definition at line 189 of file ExplicitDigitalSurface.h.
typedef Tracker DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::DigitalSurfaceTracker |
Definition at line 182 of file ExplicitDigitalSurface.h.
typedef TKSpace DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::KSpace |
Model of cellular grid space.
Definition at line 166 of file ExplicitDigitalSurface.h.
typedef KSpace::Point DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Point |
Definition at line 181 of file ExplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SCell |
Definition at line 188 of file ExplicitDigitalSurface.h.
typedef KSpace::SCellSet DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SCellSet |
Definition at line 190 of file ExplicitDigitalSurface.h.
typedef ExplicitDigitalSurface<TKSpace,TSurfelPredicate> DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Self |
Definition at line 164 of file ExplicitDigitalSurface.h.
typedef KSpace::Size DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Size |
Type for sizes (unsigned integral type).
Definition at line 170 of file ExplicitDigitalSurface.h.
typedef KSpace::Space DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Space |
Definition at line 180 of file ExplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Surfel |
Type for surfels.
Definition at line 168 of file ExplicitDigitalSurface.h.
typedef SurfelStorage::const_iterator DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelConstIterator |
Definition at line 179 of file ExplicitDigitalSurface.h.
typedef TSurfelPredicate DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelPredicate |
Definition at line 172 of file ExplicitDigitalSurface.h.
typedef std::vector<Surfel> DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelStorage |
Definition at line 178 of file ExplicitDigitalSurface.h.
|
inline |
|
inline |
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.
Definition at line 131 of file ExplicitDigitalSurface.ih.
|
inline |
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.
Definition at line 142 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::computeSurfels().
|
inline |
Definition at line 201 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfels.
DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::BOOST_CONCEPT_ASSERT | ( | (CSurfelPredicate< SurfelPredicate >) | ) |
|
inlineprotected |
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. |
Definition at line 253 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myKSpace, DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelAdjacency, DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelPredicate, and DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfels.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::ExplicitDigitalSurface().
|
inline |
Definition at line 242 of file ExplicitDigitalSurface.ih.
References DGtal::CONNECTED.
|
inline |
Definition at line 225 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfels.
|
inline |
Definition at line 209 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfels.
|
inline |
s | any surfel of the space. |
Definition at line 193 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelPredicate().
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::move().
|
inline |
Checks the validity/consistency of the object.
Definition at line 308 of file ExplicitDigitalSurface.ih.
|
inline |
Definition at line 217 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfels.
|
inline |
s | any surfel of the space. |
Definition at line 234 of file ExplicitDigitalSurface.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 296 of file ExplicitDigitalSurface.ih.
|
inline |
Definition at line 184 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myKSpace.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker().
|
inline |
accessor to surfel adjacency.
Definition at line 156 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelAdjacency.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker().
|
inline |
mutator to surfel adjacency.
Definition at line 164 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelAdjacency.
|
inline |
accessor to point predicate.
Definition at line 173 of file ExplicitDigitalSurface.ih.
References DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelPredicate.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::adjacent(), and DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::isInside().
|
private |
a reference to the cellular space.
Definition at line 301 of file ExplicitDigitalSurface.h.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::computeSurfels(), and DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::space().
|
private |
the surfel adjacency used to determine neighbors.
Definition at line 305 of file ExplicitDigitalSurface.h.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::computeSurfels(), and DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelAdjacency().
|
private |
a reference to the surfel predicate defining the shape.
Definition at line 303 of file ExplicitDigitalSurface.h.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::computeSurfels(), and DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelPredicate().
|
private |
a vector storing all the surfels of the boundary.
Definition at line 307 of file ExplicitDigitalSurface.h.
Referenced by DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::begin(), DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::computeSurfels(), DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::empty(), DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::end(), and DGtal::ExplicitDigitalSurface< TKSpace, TSurfelPredicate >::nbSurfels().