DGtal  0.9.3beta
Data Structures | Public Types | Public Member Functions | Protected Member Functions | Private Attributes
DGtal::DigitalSurface< TDigitalSurfaceContainer > Class Template Reference

#include <DGtal/topology/DigitalSurface.h>

Collaboration diagram for DGtal::DigitalSurface< TDigitalSurfaceContainer >:
[legend]

Data Structures

struct  Arc
 
struct  Edge
 
struct  Face
 
struct  SurfelMap
 
struct  VertexMap
 

Public Types

typedef TDigitalSurfaceContainer DigitalSurfaceContainer
 
typedef boost::undirected_tag directed_category
 
typedef boost::DigitalSurface_graph_traversal_category traversal_category
 
typedef boost::disallow_parallel_edge_tag edge_parallel_category
 
typedef DigitalSurface< DigitalSurfaceContainerSelf
 
typedef DigitalSurfaceContainer::KSpace KSpace
 
typedef DigitalSurfaceContainer::Cell Cell
 
typedef DigitalSurfaceContainer::SCell SCell
 
typedef DigitalSurfaceContainer::Surfel Surfel
 
typedef DigitalSurfaceContainer::SurfelConstIterator ConstIterator
 
typedef DigitalSurfaceContainer::DigitalSurfaceTracker DigitalSurfaceTracker
 
typedef KSpace::Point Point
 
typedef KSpace::SurfelSet SurfelSet
 
typedef Surfel Vertex
 
typedef KSpace::Size Size
 
typedef KSpace::SurfelSet VertexSet
 
typedef UmbrellaComputer< DigitalSurfaceTrackerUmbrella
 
typedef Umbrella::State UmbrellaState
 
typedef std::vector< ArcArcRange
 
typedef std::vector< FaceFaceRange
 
typedef std::vector< VertexVertexRange
 
typedef std::set< FaceFaceSet
 

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer >))
 
 ~DigitalSurface ()
 
 DigitalSurface (const DigitalSurface &other)
 
 DigitalSurface (const DigitalSurfaceContainer &container)
 
 DigitalSurface (DigitalSurfaceContainer *containerPtr)
 
DigitalSurfaceoperator= (const DigitalSurface &other)
 
const DigitalSurfaceContainercontainer () const
 
DigitalSurfaceContainercontainer ()
 
ConstIterator begin () const
 
ConstIterator end () const
 
Size size () const
 
Size degree (const Vertex &v) const
 
Size bestCapacity () 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
 
ArcRange outArcs (const Vertex &v) const
 
ArcRange inArcs (const Vertex &v) const
 
FaceRange facesAroundVertex (const Vertex &v) const
 
Vertex head (const Arc &a) const
 
Vertex tail (const Arc &a) const
 
Arc opposite (const Arc &a) const
 
Arc arc (const Vertex &tail, const Vertex &head) const
 
FaceRange facesAroundArc (const Arc &a) const
 
VertexRange verticesAroundFace (const Face &f) const
 
FaceSet allFaces () const
 
FaceSet allClosedFaces () const
 
FaceSet allOpenFaces () const
 
Face computeFace (UmbrellaState state) const
 
SCell separator (const Arc &a) const
 
SCell pivot (const Face &f) const
 
void selfDisplay (std::ostream &out) const
 
bool isValid () const
 
void exportSurfaceAs3DOFF (std::ostream &out) const
 
template<typename CellEmbedder >
void exportEmbeddedSurfaceAs3DOFF (std::ostream &out, const CellEmbedder &cembedder) const
 
template<typename CellEmbedder >
void exportEmbeddedSurfaceAs3DNOFF (std::ostream &out, const CellEmbedder &cembedder) const
 
template<typename SCellEmbedderWithGradientMap >
void exportAs3DNOFF (std::ostream &out, const SCellEmbedderWithGradientMap &scembedder) const
 
template<typename CellEmbedder >
void exportEmbeddedIteratedSurfaceAs3DNOFF (std::ostream &out, const CellEmbedder &cembedder) const
 

Protected Member Functions

 DigitalSurface ()
 

Private Attributes

CountedPtr< DigitalSurfaceContainermyContainer
 
DigitalSurfaceTrackermyTracker
 
UmbrellaComputer< DigitalSurfaceTrackermyUmbrellaComputer
 

Detailed Description

template<typename TDigitalSurfaceContainer>
class DGtal::DigitalSurface< TDigitalSurfaceContainer >

Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cells. Therefore, a digital surface is a pure cubical complex (model of CCubicalComplex), made of k-cells, 0 <= k < n. This complex is generally not a manifold (i.e. a kind of surface), except when it has the property of being well-composed.

Description of template class 'DigitalSurface'

For geometric analysis or visualization, it is often interesting to look at the "dual" of the digital surface. n-1-cells form now vertices, n-2-cells are edges, n-3-cells are faces, and so on. A digital surface is thus a model of CUndirectedSimpleGraph, henceforth of CUndirectedSimpleLocalGraph. The n-1-cells are then seen as the vertices of the graph, while their adjacencies constitutes the edges of the graph.

Furthermore, starting from 3D, a digital surface is in some sense a model of combinatorial surface (closed or open). You may obtain arcs (which are oriented edges) and faces (which are sequences of oriented arcs turning around some pivot cell). In 3D, this dual digital surface is a combinatorial 2-manifold, open or not depending whether the digital surface is open or closed. For instance, arcs may have 0 or 1 incident face.

We construct this dual digital surface with umbrellas, which are sequences of adjacent n-1-cells turning around a n-3-cell, called the pivot of the umbrella. Faces or umbrellas are computed with UmbrellaComputer class.

Proxy class to a DigitalSurfaceContainer.

DigitalSurface is a model of the concept CUndirectedSimpleGraph, CUndirectedSimpleLocalGraph, CConstSinglePassRange, boost::CopyConstructible, boost::Assignable.

Todo:
Should be a model of CCubicalComplex
Template Parameters
TDigitalSurfaceContainerany model of CDigitalSurfaceContainer: the concrete representation chosen for the digital surface.

ee Digital surfaces

Examples:
dec/exampleDECSurface.cpp, examples/tutorial-examples/polyhedralizer.cpp, geometry/curves/exampleGridCurve3d-2.cpp, geometry/surfaces/dvcm-2d-curvature.cpp, geometry/surfaces/dvcm-3d.cpp, geometry/surfaces/greedy-plane-segmentation-ex2.cpp, geometry/surfaces/greedy-plane-segmentation.cpp, geometry/tools/exampleAlphaShape.cpp, graph/volDistanceTraversal.cpp, topology/digitalSurfaceSlice.cpp, topology/frontierAndBoundary.cpp, topology/trackImplicitPolynomialSurfaceToOFF.cpp, topology/volBreadthFirstTraversal.cpp, topology/volMarchingCubes.cpp, topology/volToOFF.cpp, tutorial-examples/AreaSurfaceEstimation-final.cpp, and tutorial-examples/polyhedralizer.cpp.

Definition at line 121 of file DigitalSurface.h.

Member Typedef Documentation

template<typename TDigitalSurfaceContainer>
typedef std::vector<Arc> DGtal::DigitalSurface< TDigitalSurfaceContainer >::ArcRange

The range of arcs is defined as a vector.

Definition at line 282 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurfaceContainer::Cell DGtal::DigitalSurface< TDigitalSurfaceContainer >::Cell

Definition at line 142 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurfaceContainer::SurfelConstIterator DGtal::DigitalSurface< TDigitalSurfaceContainer >::ConstIterator

Definition at line 145 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef TDigitalSurfaceContainer DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurfaceContainer

Definition at line 124 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurfaceContainer::DigitalSurfaceTracker DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurfaceTracker

Definition at line 146 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef boost::undirected_tag DGtal::DigitalSurface< TDigitalSurfaceContainer >::directed_category

the graph is undirected.

Definition at line 131 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef boost::disallow_parallel_edge_tag DGtal::DigitalSurface< TDigitalSurfaceContainer >::edge_parallel_category

the graph does not allow parallel edges.

Definition at line 135 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef std::vector<Face> DGtal::DigitalSurface< TDigitalSurfaceContainer >::FaceRange

The range of faces is defined as a vector.

Definition at line 284 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef std::set<Face> DGtal::DigitalSurface< TDigitalSurfaceContainer >::FaceSet

The set of faces is defined as set.

Definition at line 288 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurfaceContainer::KSpace DGtal::DigitalSurface< TDigitalSurfaceContainer >::KSpace

Definition at line 141 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef KSpace::Point DGtal::DigitalSurface< TDigitalSurfaceContainer >::Point

Definition at line 147 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurfaceContainer::SCell DGtal::DigitalSurface< TDigitalSurfaceContainer >::SCell

Definition at line 143 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurface<DigitalSurfaceContainer> DGtal::DigitalSurface< TDigitalSurfaceContainer >::Self

Definition at line 140 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef KSpace::Size DGtal::DigitalSurface< TDigitalSurfaceContainer >::Size

Defines how to represent a size (unsigned integral type).

Definition at line 160 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef DigitalSurfaceContainer::Surfel DGtal::DigitalSurface< TDigitalSurfaceContainer >::Surfel

Definition at line 144 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef KSpace::SurfelSet DGtal::DigitalSurface< TDigitalSurfaceContainer >::SurfelSet

Definition at line 148 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef boost::DigitalSurface_graph_traversal_category DGtal::DigitalSurface< TDigitalSurfaceContainer >::traversal_category

the graph satisfies AdjacencyListGraph and VertexListGraph concepts.

Definition at line 133 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef UmbrellaComputer<DigitalSurfaceTracker> DGtal::DigitalSurface< TDigitalSurfaceContainer >::Umbrella

This define a utility class for computing umbrellas.

Definition at line 212 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef Umbrella::State DGtal::DigitalSurface< TDigitalSurfaceContainer >::UmbrellaState

The state of an umbrella is a triplet (surfel, separator, pivot). Given a state, the whole umbrella can be computed.

Definition at line 215 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef Surfel DGtal::DigitalSurface< TDigitalSurfaceContainer >::Vertex

Defines the type for a vertex.

Definition at line 158 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef std::vector<Vertex> DGtal::DigitalSurface< TDigitalSurfaceContainer >::VertexRange

The range of vertices is defined as a vector.

Definition at line 286 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
typedef KSpace::SurfelSet DGtal::DigitalSurface< TDigitalSurfaceContainer >::VertexSet

Defines how to represent a set of vertex.

Definition at line 162 of file DigitalSurface.h.

Constructor & Destructor Documentation

template<typename TDigitalSurfaceContainer>
DGtal::DigitalSurface< TDigitalSurfaceContainer >::~DigitalSurface ( )

Destructor.

template<typename TDigitalSurfaceContainer>
DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurface ( const DigitalSurface< TDigitalSurfaceContainer > &  other)

Copy constructor.

Parameters
otherthe object to clone.
template<typename TDigitalSurfaceContainer>
DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurface ( const DigitalSurfaceContainer container)

Copy constructor from container.

Parameters
containerthe container to copy.
template<typename TDigitalSurfaceContainer>
DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurface ( DigitalSurfaceContainer containerPtr)

Constructor from pointer on a dynamically allocated container.

Parameters
containerPtrthe pointer to acquire.
template<typename TDigitalSurfaceContainer>
DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurface ( )
protected

Constructor. Forbidden by default (protected to avoid g++ warnings).

Member Function Documentation

template<typename TDigitalSurfaceContainer>
FaceSet DGtal::DigitalSurface< TDigitalSurfaceContainer >::allClosedFaces ( ) const

This set of faces is sufficient for displaying the surface.

Returns
the set of all closed faces of the digital surface.
template<typename TDigitalSurfaceContainer>
FaceSet DGtal::DigitalSurface< TDigitalSurfaceContainer >::allFaces ( ) const
Returns
the set of all faces of the digital surface (open and closed faces).
template<typename TDigitalSurfaceContainer>
FaceSet DGtal::DigitalSurface< TDigitalSurfaceContainer >::allOpenFaces ( ) const

This set of faces is sufficient for displaying the boundary of the surface.

Returns
the set of all closed faces of the digital surface.
template<typename TDigitalSurfaceContainer>
Arc DGtal::DigitalSurface< TDigitalSurfaceContainer >::arc ( const Vertex tail,
const Vertex head 
) const

[tail] and [head] should be adjacent surfel.

Parameters
tailthe vertex at the tail of the arc.
headthe vertex at the head of the arc.
Returns
the arc (tail, head)
template<typename TDigitalSurfaceContainer>
ConstIterator DGtal::DigitalSurface< TDigitalSurfaceContainer >::begin ( ) const
Returns
a ConstIterator on the first surfel in the container.
Remarks
The digital surface delegates operations to some model of CDigitalSurfaceContainer. Therefore, ranges have only the guarantee to be a model CConstSinglePassRange, but not necessarily a model of CConstBidirectionalRange. For instance, if you wish to do an algorithm like: for all vertex x, for all vertex y, compute something, then the following code may not work depending on the container:
// This snippet may NOT work.
const ConstIterator itb = mySurface.begin();
const ConstIterator ite = mySurface.end();
for ( ConstIterator itX = itb; itX != ite; ++itX )
{
for ( ConstIterator itY = itb; itY != ite; ++itY )
{ // compute something with *itX and *itY.
// But itX == itY at each step ! }
// now itX == itY == ite !
}

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).

// This snippet does ALWAYS work.
for ( ConstIterator itX = mySurface.begin(),
itXEnd = mySurface.end();
itX != itXEnd; ++itX )
{
for ( ConstIterator itY = mySurface.begin(),
itYEnd = mySurface.end();
itY != itYEnd; ++itY )
{ // compute something with *itX and *itY. }
}
Examples:
tutorial-examples/AreaSurfaceEstimation-final.cpp.

Referenced by boost::edges().

template<typename TDigitalSurfaceContainer>
Size DGtal::DigitalSurface< TDigitalSurfaceContainer >::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).

Returns
2*(K::dimension-1)
template<typename TDigitalSurfaceContainer>
DGtal::DigitalSurface< TDigitalSurfaceContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer >)  )
template<typename TDigitalSurfaceContainer>
Face DGtal::DigitalSurface< TDigitalSurfaceContainer >::computeFace ( UmbrellaState  state) const
Parameters
stateany valid state (i.e. some pivot cell) on the surface.
Returns
the face that contains the given [state].
template<typename TDigitalSurfaceContainer>
const DigitalSurfaceContainer& DGtal::DigitalSurface< TDigitalSurfaceContainer >::container ( ) const
Returns
a const reference to the stored container.
template<typename TDigitalSurfaceContainer>
DigitalSurfaceContainer& DGtal::DigitalSurface< TDigitalSurfaceContainer >::container ( )
Returns
a reference to the container (may be duplicated if several DigitalSurface points on the same).
template<typename TDigitalSurfaceContainer>
Size DGtal::DigitalSurface< TDigitalSurfaceContainer >::degree ( const Vertex v) const
Parameters
vany vertex of this graph
Returns
the number of neighbors of this Vertex/Surfel.a
Precondition
container().isInside( v )

Referenced by boost::out_degree().

template<typename TDigitalSurfaceContainer>
ConstIterator DGtal::DigitalSurface< TDigitalSurfaceContainer >::end ( ) const
Returns
a ConstIterator after the last surfel in the container.

Referenced by boost::edges().

template<typename TDigitalSurfaceContainer>
template<typename SCellEmbedderWithGradientMap >
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::exportAs3DNOFF ( std::ostream &  out,
const SCellEmbedderWithGradientMap &  scembedder 
) const

Writes/Displays the object on an output stream in NOFF file format. Cells are embedded by [scembedder]. Normals are also computed by the embedder.

Parameters
outthe output stream where the object is written.
scembedderany embedder of signed cellular grid elements.
Template Parameters
SCellEmbedderWithGradientMapany model of CSCellEmbedder and CWithGradientMap.
template<typename TDigitalSurfaceContainer>
template<typename CellEmbedder >
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::exportEmbeddedIteratedSurfaceAs3DNOFF ( std::ostream &  out,
const CellEmbedder &  cembedder 
) const

Writes/Displays the object on an output stream in NOFF file format. Surface spels are embedded by [cembedder]. Normals are also computed by the embedder.

Parameters
outthe output stream where the object is written.
cembedderany embedder of digital surface spels.
template<typename TDigitalSurfaceContainer>
template<typename CellEmbedder >
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::exportEmbeddedSurfaceAs3DNOFF ( std::ostream &  out,
const CellEmbedder &  cembedder 
) const

Writes/Displays the object on an output stream in NOFF file format. Cells are embedded by [cembedder]. Normals are also computed by the embedder.

Parameters
outthe output stream where the object is written.
cembedderany embedder of cellular grid elements.
Template Parameters
CellEmbedderany model of CCellEmbedder and CWithGradientMap.
template<typename TDigitalSurfaceContainer>
template<typename CellEmbedder >
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::exportEmbeddedSurfaceAs3DOFF ( std::ostream &  out,
const CellEmbedder &  cembedder 
) const

Writes/Displays the object on an output stream in OFF file format. Cells are embedded by [cembedder]. Normals are not computed.

Parameters
outthe output stream where the object is written.
cembedderany embedder of cellular grid elements.
Template Parameters
CellEmbedderany model of CCellEmbedder.
template<typename TDigitalSurfaceContainer>
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::exportSurfaceAs3DOFF ( std::ostream &  out) const

Writes/Displays the object on an output stream in OFF file format. Cells are embbeded onto their default centroid.

Parameters
outthe output stream where the object is written.
template<typename TDigitalSurfaceContainer>
FaceRange DGtal::DigitalSurface< TDigitalSurfaceContainer >::facesAroundArc ( const Arc a) const

Computes the faces incident to a given arc. Empty in 2D. 1 face in 3D, 2 in 4D and so one, n-2 in nD. Returned faces may be open.

Parameters
aany arc on the surface.
Returns
a vector containing the faces incident to this arc.
template<typename TDigitalSurfaceContainer>
FaceRange DGtal::DigitalSurface< TDigitalSurfaceContainer >::facesAroundVertex ( const Vertex v) const
Parameters
vany vertex (surfel) of the surface.
Returns
the faces containing this vertex [v]: 0 in 2D, 4 in 3D, 12 in 4D, 2(n-1)(n-2) in nD.
template<typename TDigitalSurfaceContainer>
Vertex DGtal::DigitalSurface< TDigitalSurfaceContainer >::head ( const Arc a) const
Parameters
aany arc (s,t)
Returns
the vertex t

Referenced by boost::target().

template<typename TDigitalSurfaceContainer>
ArcRange DGtal::DigitalSurface< TDigitalSurfaceContainer >::inArcs ( const Vertex v) const
Parameters
vany vertex (surfel) of the surface.
Returns
the ingoing arcs to [v]
template<typename TDigitalSurfaceContainer>
bool DGtal::DigitalSurface< TDigitalSurfaceContainer >::isValid ( ) const

Checks the validity/consistency of the object.

Returns
'true' if the object is valid, 'false' otherwise.
template<typename TDigitalSurfaceContainer>
DigitalSurface& DGtal::DigitalSurface< TDigitalSurfaceContainer >::operator= ( const DigitalSurface< TDigitalSurfaceContainer > &  other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.
template<typename TDigitalSurfaceContainer>
Arc DGtal::DigitalSurface< TDigitalSurfaceContainer >::opposite ( const Arc a) const
Parameters
aany arc (s,t)
Returns
the arc (t,s)
template<typename TDigitalSurfaceContainer>
ArcRange DGtal::DigitalSurface< TDigitalSurfaceContainer >::outArcs ( const Vertex v) const
Parameters
vany vertex (surfel) of the surface.
Returns
the outgoing arcs from [v]

Referenced by boost::out_edges().

template<typename TDigitalSurfaceContainer>
SCell DGtal::DigitalSurface< TDigitalSurfaceContainer >::pivot ( const Face f) const

NB: there may be different faces with the same pivot (except on the boundary of well-composed pictures).

Parameters
fany face.
Returns
the positively oriented n-3-cell that is the pivot of the face.
template<typename TDigitalSurfaceContainer>
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.
template<typename TDigitalSurfaceContainer>
SCell DGtal::DigitalSurface< TDigitalSurfaceContainer >::separator ( const Arc a) const

NB: there may be two arcs with the same separator.

Parameters
aany arc.
Returns
the n-2-cell between the two surfels forming the arc.
template<typename TDigitalSurfaceContainer>
Size DGtal::DigitalSurface< TDigitalSurfaceContainer >::size ( ) const
Returns
the number of vertices of the graph.

Referenced by boost::num_vertices().

template<typename TDigitalSurfaceContainer>
Vertex DGtal::DigitalSurface< TDigitalSurfaceContainer >::tail ( const Arc a) const
Parameters
aany arc (s,t)
Returns
the vertex s

Referenced by boost::source().

template<typename TDigitalSurfaceContainer>
VertexRange DGtal::DigitalSurface< TDigitalSurfaceContainer >::verticesAroundFace ( const Face f) const

If f is incident to the arcs (s,t) and (t,u) (say), then (s,t,u) is a subsequence of the returned sequence.

Parameters
fany valid face on the digital surface (open or closed ).
Returns
the sequence of vertices that touches this face. The order follows the order of incident arcs
template<typename TDigitalSurfaceContainer>
template<typename OutputIterator >
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::writeNeighbors ( OutputIterator &  it,
const Vertex v 
) const

Writes the neighbors of [v] in the output iterator [it]. Neighbors are given in no specific order.

Template Parameters
OutputIteratorthe type for the output iterator (e.g. back_insert_iterator<std::vector<Vertex> >).
Parameters
[in,out]itany output iterator on Vertex (*it++ should be allowed), which specifies where neighbors are written.
[in]vany vertex of this graph
Precondition
container().isInside( v )

Referenced by boost::adjacent_vertices().

template<typename TDigitalSurfaceContainer>
template<typename OutputIterator , typename VertexPredicate >
void DGtal::DigitalSurface< TDigitalSurfaceContainer >::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.

Template Parameters
OutputIteratorthe type for the output iterator (e.g. back_insert_iterator<std::vector<Vertex> >).
VertexPredicateany type of predicate taking a Vertex as input.
Parameters
[in,out]itany output iterator on Vertex (*it++ should be allowed), which specifies where neighbors are written.
[in]vany vertex of this graph
[in]predthe predicate for selecting neighbors.
Precondition
container().isInside( v )

Field Documentation

template<typename TDigitalSurfaceContainer>
CountedPtr<DigitalSurfaceContainer> DGtal::DigitalSurface< TDigitalSurfaceContainer >::myContainer
private

a smart pointer on the container.

Definition at line 648 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
DigitalSurfaceTracker* DGtal::DigitalSurface< TDigitalSurfaceContainer >::myTracker
mutableprivate

a pointer on a tracker.

Definition at line 650 of file DigitalSurface.h.

template<typename TDigitalSurfaceContainer>
UmbrellaComputer<DigitalSurfaceTracker> DGtal::DigitalSurface< TDigitalSurfaceContainer >::myUmbrellaComputer
mutableprivate

This object is used to compute umbrellas over the surface.

Definition at line 652 of file DigitalSurface.h.


The documentation for this class was generated from the following file: