DGtal 1.3.0
|
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. More...
#include <DGtal/topology/LightImplicitDigitalSurface.h>
Data Structures | |
class | Tracker |
struct | VertexMap |
Public Types | |
typedef LightImplicitDigitalSurface< TKSpace, TPointPredicate > | 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 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 GraphVisitorRange< SelfVisitor > | SelfVisitorRange |
typedef SelfVisitorRange::ConstIterator | SurfelConstIterator |
typedef KSpace::Space | Space |
typedef KSpace::Point | Point |
typedef Tracker | DigitalSurfaceTracker |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CPointPredicate< PointPredicate >)) | |
~LightImplicitDigitalSurface () | |
LightImplicitDigitalSurface (const LightImplicitDigitalSurface &other) | |
LightImplicitDigitalSurface (ConstAlias< KSpace > aKSpace, ConstAlias< PointPredicate > aPP, const Adjacency &adj, const Surfel &s) | |
const Adjacency & | surfelAdjacency () const |
accessor to surfel adjacency. More... | |
Adjacency & | surfelAdjacency () |
mutator to surfel adjacency. More... | |
const PointPredicate & | pointPredicate () 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 |
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 |
a reference to the cellular space. More... | |
const PointPredicate & | myPointPredicate |
a reference to the point predicate defining the shape. More... | |
Adjacency | mySurfelAdjacency |
the surfel adjacency used to determine neighbors. More... | |
Surfel | mySurfel |
a surfel belonging to the surface. More... | |
Tracker | myTracker |
Internal tracker for visiting surfels. More... | |
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 concepts::CPointPredicate: this functor defines the inside of a shape on points where it is true. |
You may use this range only once ! This is because the iterators are only single pass. If you wish to visit twice the range, you must indeed creates two ranges by calling begin() twice (end() is not compulsory here, but advised).
Definition at line 115 of file LightImplicitDigitalSurface.h.
typedef SurfelAdjacency<KSpace::dimension> DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Adjacency |
Definition at line 214 of file LightImplicitDigitalSurface.h.
typedef KSpace::Cell DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Cell |
Definition at line 215 of file LightImplicitDigitalSurface.h.
typedef KSpace::CellSet DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::CellSet |
Definition at line 217 of file LightImplicitDigitalSurface.h.
typedef Tracker DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::DigitalSurfaceTracker |
Definition at line 235 of file LightImplicitDigitalSurface.h.
typedef TKSpace DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::KSpace |
Model of cellular grid space.
Definition at line 201 of file LightImplicitDigitalSurface.h.
typedef KSpace::Point DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Point |
Definition at line 234 of file LightImplicitDigitalSurface.h.
typedef TPointPredicate DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::PointPredicate |
Definition at line 207 of file LightImplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SCell |
Definition at line 216 of file LightImplicitDigitalSurface.h.
typedef KSpace::SCellSet DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SCellSet |
Definition at line 218 of file LightImplicitDigitalSurface.h.
typedef LightImplicitDigitalSurface<TKSpace,TPointPredicate> DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Self |
Definition at line 199 of file LightImplicitDigitalSurface.h.
typedef BreadthFirstVisitor< Self > DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SelfVisitor |
Definition at line 230 of file LightImplicitDigitalSurface.h.
typedef GraphVisitorRange< SelfVisitor > DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SelfVisitorRange |
Definition at line 231 of file LightImplicitDigitalSurface.h.
typedef KSpace::Size DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Size |
Type for sizes (unsigned integral type).
Definition at line 205 of file LightImplicitDigitalSurface.h.
typedef KSpace::Space DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Space |
Definition at line 233 of file LightImplicitDigitalSurface.h.
typedef KSpace::SCell DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Surfel |
Type for surfels.
Definition at line 203 of file LightImplicitDigitalSurface.h.
typedef SelfVisitorRange::ConstIterator DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::SurfelConstIterator |
Definition at line 232 of file LightImplicitDigitalSurface.h.
typedef Surfel DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::Vertex |
Definition at line 222 of file LightImplicitDigitalSurface.h.
typedef SCellSet DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::VertexSet |
Definition at line 223 of file LightImplicitDigitalSurface.h.
DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::~LightImplicitDigitalSurface | ( | ) |
Destructor.
DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::LightImplicitDigitalSurface | ( | const LightImplicitDigitalSurface< TKSpace, TPointPredicate > & | other | ) |
Copy constructor.
other | the object to clone. |
DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::LightImplicitDigitalSurface | ( | ConstAlias< KSpace > | aKSpace, |
ConstAlias< PointPredicate > | aPP, | ||
const Adjacency & | adj, | ||
const Surfel & | s | ||
) |
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. |
SurfelConstIterator DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::begin | ( | ) | const |
Size DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::bestCapacity | ( | ) | const |
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).
DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::BOOST_CONCEPT_ASSERT | ( | (concepts::CPointPredicate< PointPredicate >) | ) |
Connectedness DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::connectedness | ( | ) | const |
Size DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::degree | ( | const Vertex & | v | ) | const |
v | any vertex of this graph |
bool DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::empty | ( | ) | const |
SurfelConstIterator DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::end | ( | ) | const |
bool DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::isInside | ( | const Surfel & | s | ) | const |
s | any surfel of the space. |
bool DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
Size DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::nbSurfels | ( | ) | const |
DigitalSurfaceTracker * DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::newTracker | ( | const Surfel & | s | ) | const |
s | any surfel of the space. |
|
private |
Assignment.
other | the object to copy. |
const PointPredicate & DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::pointPredicate | ( | ) | const |
accessor to point predicate.
void DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::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::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::space | ( | ) | const |
Adjacency & DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::surfelAdjacency | ( | ) |
mutator to surfel adjacency.
const Adjacency & DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::surfelAdjacency | ( | ) | const |
accessor to surfel adjacency.
void DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::writeNeighbors | ( | OutputIterator & | it, |
const Vertex & | v | ||
) | const |
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 |
void DGtal::LightImplicitDigitalSurface< TKSpace, TPointPredicate >::writeNeighbors | ( | OutputIterator & | it, |
const Vertex & | v, | ||
const VertexPredicate & | pred | ||
) | const |
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. |
|
private |
a reference to the cellular space.
Definition at line 392 of file LightImplicitDigitalSurface.h.
|
private |
a reference to the point predicate defining the shape.
Definition at line 394 of file LightImplicitDigitalSurface.h.
|
private |
a surfel belonging to the surface.
Definition at line 398 of file LightImplicitDigitalSurface.h.
|
private |
the surfel adjacency used to determine neighbors.
Definition at line 396 of file LightImplicitDigitalSurface.h.
|
mutableprivate |
Internal tracker for visiting surfels.
Definition at line 400 of file LightImplicitDigitalSurface.h.