DGtal  1.5.beta
DGtal::DigitalSurface< TDigitalSurfaceContainer > Class Template Reference

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

#include <DGtal/topology/DigitalSurface.h>

Data Structures

struct  Arc
 
struct  Edge
 
struct  Face
 
struct  SurfelMap
 
struct  VertexMap
 

Public Types

typedef TDigitalSurfaceContainer DigitalSurfaceContainer
 
typedef boost::undirected_tag directed_category
 the graph is undirected. More...
 
typedef boost::DigitalSurface_graph_traversal_category traversal_category
 the graph satisfies AdjacencyListGraph and VertexListGraph concepts. More...
 
typedef boost::disallow_parallel_edge_tag edge_parallel_category
 the graph does not allow parallel edges. More...
 
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::Vector Vector
 
typedef KSpace::SurfelSet SurfelSet
 
typedef Surfel Vertex
 Defines the type for a vertex. More...
 
typedef KSpace::Size Size
 Defines how to represent a size (unsigned integral type). More...
 
typedef KSpace::SurfelSet VertexSet
 Defines how to represent a set of vertex. More...
 
typedef UmbrellaComputer< DigitalSurfaceTrackerUmbrella
 This define a utility class for computing umbrellas. More...
 
typedef Umbrella::State UmbrellaState
 
typedef std::vector< ArcArcRange
 The range of arcs is defined as a vector. More...
 
typedef std::vector< FaceFaceRange
 The range of faces is defined as a vector. More...
 
typedef std::vector< VertexVertexRange
 The range of vertices is defined as a vector. More...
 
typedef std::set< FaceFaceSet
 The set of faces is defined as set. More...
 

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, bool order_ccw_in_3d=false) 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
 a smart pointer on the container. More...
 
DigitalSurfaceTrackermyTracker
 a pointer on a tracker. More...
 
UmbrellaComputer< DigitalSurfaceTrackermyUmbrellaComputer
 This object is used to compute umbrellas over the surface. More...
 

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'

Note
On interior / exterior side of a surface. A digital surface is composed of oriented n-1-cells, and it is thus oriented. By convention, the interior side of a digital surface (globally) or of a surfel (locally) is in its direct incidence, while the exterior side is in its indirect incidence. You can obtain the normal vector to a surfel pointing outside as follows:
// S is the current digital surface
// v is a vertex / surfel
auto& K = S.container().space();
auto j = K.sOrthDir( v );
bool d = K.sDirect( v, j );
// N is the normal vector pointing outside.
auto N = K.sCoords( K.sIncident( v, j, ! d ) ) // outside voxel
- K.sCoords( K.sIncident( v, j, d ) ); // inside voxel
KSpace K

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.

Digital surfaces

Examples
dec/exampleDECSurface.cpp.

Definition at line 139 of file DigitalSurface.h.

Member Typedef Documentation

◆ ArcRange

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

The range of arcs is defined as a vector.

Definition at line 301 of file DigitalSurface.h.

◆ Cell

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

Definition at line 160 of file DigitalSurface.h.

◆ ConstIterator

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

Definition at line 163 of file DigitalSurface.h.

◆ DigitalSurfaceContainer

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

Definition at line 142 of file DigitalSurface.h.

◆ DigitalSurfaceTracker

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

Definition at line 164 of file DigitalSurface.h.

◆ directed_category

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

the graph is undirected.

Definition at line 149 of file DigitalSurface.h.

◆ edge_parallel_category

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 153 of file DigitalSurface.h.

◆ FaceRange

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

The range of faces is defined as a vector.

Definition at line 303 of file DigitalSurface.h.

◆ FaceSet

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

The set of faces is defined as set.

Definition at line 307 of file DigitalSurface.h.

◆ KSpace

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

Definition at line 159 of file DigitalSurface.h.

◆ Point

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

Definition at line 165 of file DigitalSurface.h.

◆ SCell

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

Definition at line 161 of file DigitalSurface.h.

◆ Self

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

Definition at line 158 of file DigitalSurface.h.

◆ Size

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

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

Definition at line 179 of file DigitalSurface.h.

◆ Surfel

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

Definition at line 162 of file DigitalSurface.h.

◆ SurfelSet

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

Definition at line 167 of file DigitalSurface.h.

◆ traversal_category

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

the graph satisfies AdjacencyListGraph and VertexListGraph concepts.

Definition at line 151 of file DigitalSurface.h.

◆ Umbrella

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

This define a utility class for computing umbrellas.

Definition at line 231 of file DigitalSurface.h.

◆ UmbrellaState

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 234 of file DigitalSurface.h.

◆ Vector

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

Definition at line 166 of file DigitalSurface.h.

◆ Vertex

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

Defines the type for a vertex.

Definition at line 177 of file DigitalSurface.h.

◆ VertexRange

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

The range of vertices is defined as a vector.

Definition at line 305 of file DigitalSurface.h.

◆ VertexSet

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

Defines how to represent a set of vertex.

Definition at line 181 of file DigitalSurface.h.

Constructor & Destructor Documentation

◆ ~DigitalSurface()

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

Destructor.

◆ DigitalSurface() [1/4]

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

Copy constructor.

Parameters
otherthe object to clone.

◆ DigitalSurface() [2/4]

template<typename TDigitalSurfaceContainer >
DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurface ( const DigitalSurfaceContainer container)

Copy constructor from container.

Parameters
containerthe container to copy.

◆ DigitalSurface() [3/4]

template<typename TDigitalSurfaceContainer >
DGtal::DigitalSurface< TDigitalSurfaceContainer >::DigitalSurface ( DigitalSurfaceContainer containerPtr)

Constructor from pointer on a dynamically allocated container.

Parameters
containerPtrthe pointer to acquire.

◆ DigitalSurface() [4/4]

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

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

Member Function Documentation

◆ allClosedFaces()

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.

Referenced by main().

◆ allFaces()

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

Referenced by testCombinatorialSurface().

◆ allOpenFaces()

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.

◆ arc()

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)

◆ begin()

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 !
}
MyDigitalSurface::ConstIterator ConstIterator

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

Referenced by boost::edges(), laplace_sphere(), main(), testCurvature2d(), testDigitalSurfaceBoostGraphInterface(), testEstimatorCache(), testGaussianCurvature3d(), testLocalConvolutionNormalVectorEstimator(), testMeanCurvature3d(), testPrincipalCurvatures3d(), and testRaySurface().

◆ bestCapacity()

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)

◆ BOOST_CONCEPT_ASSERT()

template<typename TDigitalSurfaceContainer >
DGtal::DigitalSurface< TDigitalSurfaceContainer >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer >)  )

◆ computeFace()

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

◆ container() [1/2]

template<typename TDigitalSurfaceContainer >
DigitalSurfaceContainer& DGtal::DigitalSurface< TDigitalSurfaceContainer >::container ( )
Returns
a reference to the container (may be duplicated if several DigitalSurface points on the same).

◆ container() [2/2]

template<typename TDigitalSurfaceContainer >
const DigitalSurfaceContainer& DGtal::DigitalSurface< TDigitalSurfaceContainer >::container ( ) const
Returns
a const reference to the stored container.

Referenced by main().

◆ degree()

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

◆ end()

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

Referenced by boost::edges(), laplace_sphere(), main(), testEstimatorCache(), testLocalConvolutionNormalVectorEstimator(), and testRaySurface().

◆ exportAs3DNOFF()

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.

Referenced by testLocalConvolutionNormalVectorEstimator().

◆ exportEmbeddedIteratedSurfaceAs3DNOFF()

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.

◆ exportEmbeddedSurfaceAs3DNOFF()

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.

Referenced by main().

◆ exportEmbeddedSurfaceAs3DOFF()

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.

Referenced by main().

◆ exportSurfaceAs3DOFF()

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.

Referenced by main(), and testCombinatorialSurface().

◆ facesAroundArc()

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.

Referenced by testCombinatorialSurface().

◆ facesAroundVertex()

template<typename TDigitalSurfaceContainer >
FaceRange DGtal::DigitalSurface< TDigitalSurfaceContainer >::facesAroundVertex ( const Vertex v,
bool  order_ccw_in_3d = false 
) const
Parameters
vany vertex (surfel) of the surface.
order_ccw_in_3dwhen 'true', orders faces counterclockwise around vertex (solely in 3d). It corresponds to ordering the pointels counterclockwise around the given surfel v, seen from the exterior side of the surfel.
Returns
the faces containing this vertex [v]: 0 in 2D, 4 in 3D, 12 in 4D, 2(n-1)(n-2) in nD, in no specific order.
Note
By convention, the interior side of a digital surface (globally) or of a surfel (locally) is in its direct incidence, while the exterior side is in its indirect incidence (see text in DigitalSurface description).

◆ head()

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(), and testCombinatorialSurface().

◆ inArcs()

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]

◆ isValid()

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.

◆ operator=()

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

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ opposite()

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

Referenced by testDigitalSurfaceBoostGraphInterface().

◆ outArcs()

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(), and testCombinatorialSurface().

◆ pivot()

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.

Referenced by testCombinatorialSurface().

◆ selfDisplay()

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.

◆ separator()

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.

Referenced by testDigitalSurfaceBoostGraphInterface().

◆ size()

template<typename TDigitalSurfaceContainer >
Size DGtal::DigitalSurface< TDigitalSurfaceContainer >::size ( ) const
Returns
the number of vertices of the graph.

Referenced by laplacian(), main(), boost::num_vertices(), and testDigitalSurfaceBoostGraphInterface().

◆ tail()

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

◆ verticesAroundFace()

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

Referenced by main(), and testCombinatorialSurface().

◆ writeNeighbors() [1/2]

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(), and main().

◆ writeNeighbors() [2/2]

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

◆ myContainer

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

a smart pointer on the container.

Definition at line 679 of file DigitalSurface.h.

◆ myTracker

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

a pointer on a tracker.

Definition at line 681 of file DigitalSurface.h.

◆ myUmbrellaComputer

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

This object is used to compute umbrellas over the surface.

Definition at line 683 of file DigitalSurface.h.


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