DGtal
0.6.devel
|
#include <LightImplicitDigitalSurface.h>
Data Structures | |
class | Tracker |
struct | VertexMap |
Public Types | |
typedef LightImplicitDigitalSurface < TKSpace, TPointPredicate > | Self |
typedef TKSpace | KSpace |
typedef KSpace::SCell | Surfel |
typedef KSpace::Size | Size |
typedef TPointPredicate | PointPredicate |
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 ((CPointPredicate< PointPredicate >)) | |
~LightImplicitDigitalSurface () | |
LightImplicitDigitalSurface (const LightImplicitDigitalSurface &other) | |
LightImplicitDigitalSurface (const KSpace &aKSpace, const PointPredicate &aPP, const Adjacency &adj, const Surfel &s) | |
const Adjacency & | surfelAdjacency () const |
Adjacency & | surfelAdjacency () |
const PointPredicate & | pointPredicate () 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 |
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 | |
LightImplicitDigitalSurface & | operator= (const LightImplicitDigitalSurface &other) |
Private Attributes | |
const KSpace & | myKSpace |
const PointPredicate & | myPointPredicate |
Adjacency | mySurfelAdjacency |
Surfel | mySurfel |
Tracker | myTracker |
Aim: A model of CDigitalSurfaceContainer which defines the digital surface as the boundary of an implicitly define shape. The whole boundary is not precomputed nor stored. You may use an iterator to visit it.
Description of template class 'LightImplicitDigitalSurface'
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. |
TPointPredicate | a model of CPointPredicate: this functor defines the inside of a shape on points where it is true. |
Definition at line 76 of file LightImplicitDigitalSurface.h.
typedef SurfelAdjacency<KSpace::dimension> DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Adjacency |
Definition at line 175 of file LightImplicitDigitalSurface.h.
typedef KSpace::Cell DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Cell |
Definition at line 176 of file LightImplicitDigitalSurface.h.
typedef KSpace::CellSet DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::CellSet |
Definition at line 178 of file LightImplicitDigitalSurface.h.
typedef Tracker DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::DigitalSurfaceTracker |
Definition at line 195 of file LightImplicitDigitalSurface.h.
typedef TKSpace DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::KSpace |
Model of cellular grid space.
Definition at line 162 of file LightImplicitDigitalSurface.h.
typedef KSpace::Point DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Point |
Definition at line 194 of file LightImplicitDigitalSurface.h.
typedef TPointPredicate DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::PointPredicate |
Definition at line 168 of file LightImplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SCell |
Definition at line 177 of file LightImplicitDigitalSurface.h.
typedef KSpace::SCellSet DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SCellSet |
Definition at line 179 of file LightImplicitDigitalSurface.h.
typedef LightImplicitDigitalSurface<TKSpace,TPointPredicate> DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Self |
Definition at line 160 of file LightImplicitDigitalSurface.h.
typedef BreadthFirstVisitor< Self > DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SelfVisitor |
Definition at line 191 of file LightImplicitDigitalSurface.h.
typedef KSpace::Size DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Size |
Type for sizes (unsigned integral type).
Definition at line 166 of file LightImplicitDigitalSurface.h.
typedef KSpace::Space DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Space |
Definition at line 193 of file LightImplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Surfel |
Type for surfels.
Definition at line 164 of file LightImplicitDigitalSurface.h.
typedef SelfVisitor::VertexConstIterator DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SurfelConstIterator |
Definition at line 192 of file LightImplicitDigitalSurface.h.
typedef Surfel DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Vertex |
Definition at line 183 of file LightImplicitDigitalSurface.h.
typedef SCellSet DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::VertexSet |
Definition at line 184 of file LightImplicitDigitalSurface.h.
|
inline |
|
inline |
Copy constructor.
other | the object to clone. |
Definition at line 131 of file LightImplicitDigitalSurface.ih.
|
inline |
Constructor from digital set.
aKSpace | a cellular grid space (referenced). |
aPP | a point predicate defining implicitly 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 143 of file LightImplicitDigitalSurface.ih.
|
inline |
Definition at line 214 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::mySurfel.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::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 337 of file LightImplicitDigitalSurface.ih.
DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT | ( | (CPointPredicate< PointPredicate >) | ) |
|
inline |
Definition at line 260 of file LightImplicitDigitalSurface.ih.
References DGtal::CONNECTED.
|
inline |
v | any vertex of this graph |
Definition at line 271 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::adjacent(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::move(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myTracker, and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::space().
|
inline |
Definition at line 243 of file LightImplicitDigitalSurface.ih.
|
inline |
Definition at line 224 of file LightImplicitDigitalSurface.ih.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::nbSurfels().
|
inline |
s | any surfel of the space. |
Definition at line 193 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myKSpace, and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myPointPredicate.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::move().
|
inline |
Checks the validity/consistency of the object.
Definition at line 367 of file LightImplicitDigitalSurface.ih.
|
inline |
Definition at line 232 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::begin(), and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::end().
|
inline |
s | any surfel of the space. |
Definition at line 252 of file LightImplicitDigitalSurface.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
accessor to point predicate.
Definition at line 173 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myPointPredicate.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::adjacent().
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 355 of file LightImplicitDigitalSurface.ih.
|
inline |
Definition at line 184 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myKSpace.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::degree(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::Tracker(), and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::writeNeighbors().
|
inline |
accessor to surfel adjacency.
Definition at line 156 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::mySurfelAdjacency.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::Tracker().
|
inline |
mutator to surfel adjacency.
Definition at line 164 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::mySurfelAdjacency.
|
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 292 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::adjacent(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::move(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myTracker, and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::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 312 of file LightImplicitDigitalSurface.ih.
References DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::adjacent(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Tracker::move(), DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::myTracker, and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::space().
|
private |
a reference to the cellular space.
Definition at line 352 of file LightImplicitDigitalSurface.h.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::isInside(), and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::space().
|
private |
a reference to the point predicate defining the shape.
Definition at line 354 of file LightImplicitDigitalSurface.h.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::isInside(), and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::pointPredicate().
|
private |
a surfel belonging to the surface.
Definition at line 358 of file LightImplicitDigitalSurface.h.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::begin().
|
private |
the surfel adjacency used to determine neighbors.
Definition at line 356 of file LightImplicitDigitalSurface.h.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::surfelAdjacency().
|
mutableprivate |
Internal tracker for visiting surfels.
Definition at line 360 of file LightImplicitDigitalSurface.h.
Referenced by DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::degree(), and DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::writeNeighbors().