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