DGtal
0.6.devel
|
#include <LightExplicitDigitalSurface.h>
Data Structures | |
class | Tracker |
struct | VertexMap |
Public Types | |
typedef LightExplicitDigitalSurface < TKSpace, TSurfelPredicate > | Self |
typedef TKSpace | KSpace |
typedef KSpace::SCell | Surfel |
typedef KSpace::Size | Size |
typedef TSurfelPredicate | SurfelPredicate |
typedef SurfelAdjacency < KSpace::dimension > | Adjacency |
typedef KSpace::Cell | Cell |
typedef KSpace::SCell | SCell |
typedef KSpace::CellSet | CellSet |
typedef KSpace::SCellSet | SCellSet |
typedef Surfel | Vertex |
typedef SCellSet | VertexSet |
typedef BreadthFirstVisitor< Self > | SelfVisitor |
typedef SelfVisitor::VertexConstIterator | SurfelConstIterator |
typedef KSpace::Space | Space |
typedef KSpace::Point | Point |
typedef Tracker | DigitalSurfaceTracker |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((CSurfelPredicate< SurfelPredicate >)) | |
~LightExplicitDigitalSurface () | |
LightExplicitDigitalSurface (const LightExplicitDigitalSurface &other) | |
LightExplicitDigitalSurface (const KSpace &aKSpace, const SurfelPredicate &aSP, const Adjacency &adj, const Surfel &s) | |
const Adjacency & | surfelAdjacency () const |
Adjacency & | surfelAdjacency () |
const SurfelPredicate & | surfelPredicate () const |
const Surfel & | surfel () const |
void | setSurfel (const Surfel &aSurfel) |
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 |
Size | degree (const Vertex &v) const |
template<typename OutputIterator > | |
void | writeNeighbors (OutputIterator &it, const Vertex &v) const |
template<typename OutputIterator , typename VertexPredicate > | |
void | writeNeighbors (OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const |
Size | bestCapacity () const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Member Functions | |
LightExplicitDigitalSurface & | operator= (const LightExplicitDigitalSurface &other) |
Private Attributes | |
const KSpace & | myKSpace |
const SurfelPredicate & | mySurfelPredicate |
Adjacency | mySurfelAdjacency |
Surfel | mySurfel |
Tracker | myTracker |
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. The whole boundary is not precomputed nor stored. You may use an iterator to visit it.
Description of template class 'LightExplicitDigitalSurface'
It is also a model of CUndirectedSimpleLocalGraph, so as to be able to visit itself with a BreadthFirstVisitor. The "Light" or lazyness is implemented this way.
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 78 of file LightExplicitDigitalSurface.h.
typedef SurfelAdjacency<KSpace::dimension> DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Adjacency |
Definition at line 177 of file LightExplicitDigitalSurface.h.
typedef KSpace::Cell DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Cell |
Definition at line 178 of file LightExplicitDigitalSurface.h.
typedef KSpace::CellSet DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::CellSet |
Definition at line 180 of file LightExplicitDigitalSurface.h.
typedef Tracker DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::DigitalSurfaceTracker |
Definition at line 197 of file LightExplicitDigitalSurface.h.
typedef TKSpace DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::KSpace |
Model of cellular grid space.
Definition at line 164 of file LightExplicitDigitalSurface.h.
typedef KSpace::Point DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Point |
Definition at line 196 of file LightExplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SCell |
Definition at line 179 of file LightExplicitDigitalSurface.h.
typedef KSpace::SCellSet DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SCellSet |
Definition at line 181 of file LightExplicitDigitalSurface.h.
typedef LightExplicitDigitalSurface<TKSpace,TSurfelPredicate> DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Self |
Definition at line 162 of file LightExplicitDigitalSurface.h.
typedef BreadthFirstVisitor< Self > DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SelfVisitor |
Definition at line 193 of file LightExplicitDigitalSurface.h.
typedef KSpace::Size DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Size |
Type for sizes (unsigned integral type).
Definition at line 168 of file LightExplicitDigitalSurface.h.
typedef KSpace::Space DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Space |
Definition at line 195 of file LightExplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Surfel |
Type for surfels.
Definition at line 166 of file LightExplicitDigitalSurface.h.
typedef SelfVisitor::VertexConstIterator DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelConstIterator |
Definition at line 194 of file LightExplicitDigitalSurface.h.
typedef TSurfelPredicate DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::SurfelPredicate |
Definition at line 170 of file LightExplicitDigitalSurface.h.
typedef Surfel DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Vertex |
Definition at line 185 of file LightExplicitDigitalSurface.h.
typedef SCellSet DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::VertexSet |
Definition at line 186 of file LightExplicitDigitalSurface.h.
|
inline |
|
inline |
Copy constructor.
other | the object to clone. |
Definition at line 132 of file LightExplicitDigitalSurface.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 aPP is true in the interior and false in the exterior. |
Definition at line 144 of file LightExplicitDigitalSurface.ih.
|
inline |
Definition at line 223 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfel.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::nbSurfels().
|
inline |
Should return a reasonable estimation of the number of neighbors for all vertices. For instance a planar triangulation should return 6-8, a quad-mesh should return 4, digital surface is 2*(K::dimension-1).
Definition at line 346 of file LightExplicitDigitalSurface.ih.
DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::BOOST_CONCEPT_ASSERT | ( | (CSurfelPredicate< SurfelPredicate >) | ) |
|
inline |
Definition at line 269 of file LightExplicitDigitalSurface.ih.
References DGtal::CONNECTED.
|
inline |
v | any vertex of this graph |
Definition at line 280 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::adjacent(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::move(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myTracker, and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::space().
|
inline |
Definition at line 252 of file LightExplicitDigitalSurface.ih.
|
inline |
Definition at line 233 of file LightExplicitDigitalSurface.ih.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::nbSurfels().
|
inline |
s | any surfel of the space. |
Definition at line 215 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelPredicate().
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::move().
|
inline |
Checks the validity/consistency of the object.
Definition at line 376 of file LightExplicitDigitalSurface.ih.
|
inline |
Definition at line 241 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::begin(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::end().
|
inline |
s | any surfel of the space. |
Definition at line 261 of file LightExplicitDigitalSurface.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 364 of file LightExplicitDigitalSurface.ih.
|
inline |
mutator to starting surfel.
Definition at line 191 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myKSpace, DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfel, DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelPredicate, and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myTracker.
|
inline |
Definition at line 206 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myKSpace.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::degree(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::writeNeighbors().
|
inline |
accessor to starting surfel.
Definition at line 183 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfel.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::current().
|
inline |
accessor to surfel adjacency.
Definition at line 157 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelAdjacency.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::Tracker().
|
inline |
mutator to surfel adjacency.
Definition at line 165 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelAdjacency.
|
inline |
accessor to surfel predicate.
Definition at line 174 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::mySurfelPredicate.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::adjacent(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::isInside().
|
inline |
Writes the neighbors of [v] in the output iterator [it]. Neighbors are given in no specific order.
OutputIterator | the type for the output iterator (e.g. back_insert_iterator<std::vector<Vertex> >). |
[in,out] | it | any output iterator on Vertex (*it++ should be allowed), which specifies where neighbors are written. |
[in] | v | any vertex of this graph |
Definition at line 301 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::adjacent(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::move(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myTracker, and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::space().
|
inline |
Writes the neighbors of [v], verifying the predicate [pred] in the output iterator [it]. Neighbors are given in no specific order.
OutputIterator | the type for the output iterator (e.g. back_insert_iterator<std::vector<Vertex> >). |
VertexPredicate | any type of predicate taking a Vertex as input. |
[in,out] | it | any output iterator on Vertex (*it++ should be allowed), which specifies where neighbors are written. |
[in] | v | any vertex of this graph |
[in] | pred | the predicate for selecting neighbors. |
Definition at line 321 of file LightExplicitDigitalSurface.ih.
References DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::adjacent(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::BOOST_CONCEPT_ASSERT(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::Tracker::move(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::myTracker, and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::space().
|
private |
a reference to the cellular space.
Definition at line 357 of file LightExplicitDigitalSurface.h.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::setSurfel(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::space().
|
private |
a surfel belonging to the surface.
Definition at line 363 of file LightExplicitDigitalSurface.h.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::begin(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::setSurfel(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfel().
|
private |
the surfel adjacency used to determine neighbors.
Definition at line 361 of file LightExplicitDigitalSurface.h.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelAdjacency().
|
private |
a reference to the surfel predicate defining the shape.
Definition at line 359 of file LightExplicitDigitalSurface.h.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::setSurfel(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::surfelPredicate().
|
mutableprivate |
Internal tracker for visiting surfels.
Definition at line 365 of file LightExplicitDigitalSurface.h.
Referenced by DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::degree(), DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::setSurfel(), and DGtal::LightExplicitDigitalSurface< TKSpace, TSurfelPredicate >::writeNeighbors().