31#if defined(IndexedDigitalSurface_RECURSES)
32#error Recursive header files inclusion detected in IndexedDigitalSurface.h
35#define IndexedDigitalSurface_RECURSES
37#if !defined IndexedDigitalSurface_h
39#define IndexedDigitalSurface_h
47#include "DGtal/base/Common.h"
48#include "DGtal/base/OwningOrAliasingPtr.h"
49#include "DGtal/base/IntegerSequenceIterator.h"
50#include "DGtal/topology/HalfEdgeDataStructure.h"
51#include "DGtal/topology/CDigitalSurfaceContainer.h"
95 template <
typename TDigitalSurfaceContainer>
103 typedef typename DigitalSurfaceContainer::KSpace
KSpace;
124 typedef typename std::map<Vertex, Value>
Type;
148 template <
typename TData>
176 myData( &aStorage, false )
257 build( surfContainer );
337 template <
typename AnyData>
345 template <
typename AnyData>
352 template <
typename AnyData>
360 template <
typename AnyData>
367 template <
typename AnyData>
375 template <
typename AnyData>
431 return it !=
myLinel2Arc.end() ? it->second : INVALID_FACE;
477 template <
typename OutputIterator>
498 template <
typename OutputIterator,
typename VertexPredicate>
502 const VertexPredicate & pred)
const;
713 template <
typename TDigitalSurfaceContainer>
723#include "DGtal/topology/IndexedDigitalSurface.ih"
730#undef IndexedDigitalSurface_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: This class represents an half-edge data structure, which is a structure for representing the top...
Index HalfEdgeIndex
The type used for numbering half-edges (alias)
std::vector< VertexIndex > PolygonalFace
Index FaceIndex
The type for numbering faces.
Index EdgeIndex
The type for numbering edges.
std::size_t Index
The type used for numbering half-edges (an offset an the half-edges structure).
Index VertexIndex
The type for numbering vertices.
std::size_t Size
The type for counting elements.
Aim: Represents a digital surface with the topology of its dual surface. Its aim is to mimick the sta...
SCellStorage myVertexIndex2Surfel
Mapping VertexIndex -> Surfel.
VertexRange allVertices() const
std::vector< Face > FaceRange
HalfEdgeDataStructure::FaceIndex Face
ArcRange outArcs(const Vertex &v) const
void writeNeighbors(OutputIterator &it, const Vertex &v, const VertexPredicate &pred) const
IndexedPropertyMap< AnyData > makeFaceMap() const
IndexedDigitalSurface< TDigitalSurfaceContainer > Self
FaceRange facesAroundArc(const Arc &a) const
std::vector< PolygonalFace > PolygonalFacesStorage
const RealPoint & position(Vertex v) const
HalfEdgeDataStructure::Index Index
HalfEdgeDataStructure myHEDS
The half-edge data structure that stores the topology of the mesh.
IndexedPropertyMap< AnyData > makeFaceMap(AnyData value) const
IndexedPropertyMap< AnyData > makeEdgeMap(AnyData value) const
HalfEdgeDataStructure::EdgeIndex EdgeIndex
std::set< Vertex > VertexSet
Vertex tail(const Arc &a) const
void selfDisplay(std::ostream &out) const
BOOST_STATIC_CONSTANT(Face, INVALID_FACE=HALF_EDGE_INVALID_INDEX)
Space::RealPoint RealPoint
PolygonalFacesStorage myPolygonalFaces
Stores the polygonal faces.
const HalfEdgeDataStructure & heds() const
const SCell & pointel(Face f) const
Vertex getVertex(const SCell &aSurfel) const
void clear()
Clears everything.
ConstIterator begin() const
bool isVertexBoundary(const Vertex &v) const
HalfEdgeDataStructure::VertexIndex VertexIndex
std::vector< RealPoint > PositionsStorage
RealPoint & position(Vertex v)
const SCell & surfel(Vertex v) const
PositionsStorage myPositions
Stores the information for each Vertex.
std::map< SCell, Arc > myLinel2Arc
Mapping Linel -> Arc.
CountedConstPtrOrConstPtr< DigitalSurfaceContainer > myContainer
The (secured or not) pointer to the associated digital surface container.
ArcRange inArcs(const Vertex &v) const
HalfEdgeDataStructure::Triangle Triangle
IndexedDigitalSurface(ConstAlias< DigitalSurfaceContainer > surfContainer)
std::map< SCell, FaceIndex > myPointel2FaceIndex
Mapping Pointel -> FaceIndex.
IndexedPropertyMap< AnyData > makeEdgeMap() const
bool isArcBoundary(const Arc &v) const
IndexedPropertyMap< RealPoint > PositionsMap
Arc opposite(const Arc &a) const
bool build(ConstAlias< DigitalSurfaceContainer > surfContainer)
Arc arc(const Vertex &t, const Vertex &h) const
void writeNeighbors(OutputIterator &it, const Vertex &v) const
IndexedPropertyMap< AnyData > makeVertexMap(AnyData value) const
std::vector< SCell > SCellStorage
const KSpace & space() const
BOOST_CONCEPT_ASSERT((concepts::CDigitalSurfaceContainer< DigitalSurfaceContainer >))
IntegerSequenceIterator< VertexIndex > ConstIterator
SCellStorage myFaceIndex2Pointel
Mapping FaceIndex -> Pointel.
TDigitalSurfaceContainer DigitalSurfaceContainer
const DigitalSurfaceContainer & container() const
std::vector< Arc > ArcRange
IndexedPropertyMap< AnyData > makeVertexMap() const
IndexedPropertyMap< SCell > surfels()
FaceRange allFaces() const
Vertex head(const Arc &a) const
HalfEdgeDataStructure::FaceIndex FaceIndex
FaceRange facesAroundVertex(const Vertex &v) const
bool isHEDSValid
Indicates if the half-edge structure has been created/updated.
Arc next(const Arc &a) const
HalfEdgeDataStructure::PolygonalFace PolygonalFace
IndexedPropertyMap< SCell > linels()
DigitalSurfaceContainer::KSpace KSpace
HalfEdgeDataStructure::Size Size
Face faceAroundArc(const Arc &a) const
ArcRange allBoundaryArcs() const
IndexedPropertyMap< SCell > pointels()
std::map< SCell, VertexIndex > mySurfel2VertexIndex
Mapping Surfel -> VertexIndex.
ConstIterator end() const
SCellStorage myArc2Linel
Mapping Arc -> Linel.
Arc getArc(const SCell &aLinel) const
const SCell & linel(Arc a) const
Size bestCapacity() const
HalfEdgeDataStructure::HalfEdge HalfEdge
Size degree(const Vertex &v) const
VertexRange verticesAroundFace(const Face &f) const
std::vector< Vertex > VertexRange
Face getFace(const SCell &aPointel) const
HalfEdgeDataStructure::HalfEdgeIndex Arc
VertexRange allBoundaryVertices() const
Aim: It is a simple class that mimics a (non mutable) iterator over integers. You can increment it,...
Aim: This class describes a smart pointer that is, given the constructor called by the user,...
Aim: Implements basic operations that will be used in Point and Vector classes.
DGtal is the top-level namespace which contains all DGtal functions and types.
static std::size_t const HALF_EDGE_INVALID_INDEX
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Represents an unoriented triangle as three vertices.
OwningOrAliasingPtr< Storage > myData
An owned or aliased pointer to the vector of data.
IndexedPropertyMap(const Self &aSurface, Storage &aStorage)
const Self & surface() const
const Self * mySurface
The associated indexed digital surface.
Data & operator[](Argument v)
const Storage & storage() const
IndexedPropertyMap()
Default constructor. The object is invalid.
const Data & operator()(Argument v) const
IndexedPropertyMap(const Self &aSurface, Size s, Data def_data=Data())
const Data & operator[](Argument v) const
std::vector< Data > Storage
std::map< Vertex, Value > Type
Represents a signed cell in a cellular grid space by its Khalimsky coordinates and a boolean value.
Aim: The digital surface container concept describes a minimal set of inner types and methods so as t...