Aim: Represents a 2-dimensional slice in a DigitalSurface. In a sense, it is a 4-connected contour, open or not. To be valid, it must be connected to some digital surface and a starting surfel.
More...
#include <DGtal/topology/DigitalSurface2DSlice.h>
template<typename TDigitalSurfaceTracker>
class DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >
Aim: Represents a 2-dimensional slice in a DigitalSurface. In a sense, it is a 4-connected contour, open or not. To be valid, it must be connected to some digital surface and a starting surfel.
Description of template class 'DigitalSurface2DSlice'
It provides the following inner types:
And the following (circular)iterator services:
You can use these services to iterate over the elements. Note that c() and rc() are defined so as to start on the same surfel (when dereferenced). The same is true for cstart() and rcstart(). You should use circulators when isClosed() is true, otherwise it will connect unconnected surfels (the two extremities of the open slice contour).
- Template Parameters
-
TDigitalSurfaceTracker | any model of CDigitalSurfaceTracker: the concrete representation chosen for tracking the digital surface. |
- Examples
- geometry/curves/exampleGridCurve3d-2.cpp, and topology/digitalSurfaceSlice.cpp.
Definition at line 93 of file DigitalSurface2DSlice.h.
◆ ConstCirculator
template<typename TDigitalSurfaceTracker>
◆ ConstIterator
template<typename TDigitalSurfaceTracker>
◆ ConstReverseCirculator
template<typename TDigitalSurfaceTracker>
◆ ConstReverseIterator
template<typename TDigitalSurfaceTracker>
◆ DigitalSurfaceContainer
template<typename TDigitalSurfaceTracker>
◆ DigitalSurfaceTracker
template<typename TDigitalSurfaceTracker>
◆ KSpace
template<typename TDigitalSurfaceTracker>
◆ Self
template<typename TDigitalSurfaceTracker>
◆ Size
template<typename TDigitalSurfaceTracker>
◆ Storage
template<typename TDigitalSurfaceTracker>
◆ Surfel
template<typename TDigitalSurfaceTracker>
◆ TheDigitalSurface
template<typename TDigitalSurfaceTracker>
◆ ~DigitalSurface2DSlice()
template<typename TDigitalSurfaceTracker>
◆ DigitalSurface2DSlice() [1/3]
template<typename TDigitalSurfaceTracker>
Constructor from tracker and Dimension. The current position of the tracker gives the starting surfel s. The 2D slice spans a 2D-plane containing axes i and sOrthDir( s ).
- Parameters
-
tracker | a pointer on a tracker, which will be moved to build the slice. More precisely, if the contour is open, the tracker is moved to the first surfel when traversing in the direct orientation. If the contour is closed, the tracker is returned at the same position. |
i | a direction different from the orthogonal direction of the current surfel of the tracker. |
- See also
- init
NB: O(n) complexity (at least) if n is the number of surfels of the slice.
◆ DigitalSurface2DSlice() [2/3]
template<typename TDigitalSurfaceTracker>
Constructor. Forbidden by default (protected to avoid g++ warnings).
◆ DigitalSurface2DSlice() [3/3]
template<typename TDigitalSurfaceTracker>
Copy constructor.
- Parameters
-
other | the object to clone. Forbidden by default. |
◆ begin()
template<typename TDigitalSurfaceTracker>
◆ BOOST_CONCEPT_ASSERT()
template<typename TDigitalSurfaceTracker>
◆ c()
template<typename TDigitalSurfaceTracker>
◆ cstart()
template<typename TDigitalSurfaceTracker>
- Returns
- the circulator on the surfel that was given for initialization.
◆ end()
template<typename TDigitalSurfaceTracker>
◆ init()
template<typename TDigitalSurfaceTracker>
Initializes the slice from a tracker tracker and a direction i.
- Parameters
-
tracker | a pointer on a tracker, which will be moved to build the slice. More precisely, if the contour is open, the tracker is moved to the first surfel when traversing in the direct orientation. If the contour is closed, the tracker is returned at the same position. |
i | a direction different from the orthogonal direction of the current surfel of the tracker. |
- Returns
- 'true' if the initialization was ok, false otherwise (for instance if i is the orthogonal direction of the current surfel of the tracker.
NB: O(n) complexity (at least) if n is the number of surfels of the slice.
◆ isClosed()
template<typename TDigitalSurfaceTracker>
- Returns
- 'true' if the contour is closed, 'false' otherwise.
◆ isValid()
template<typename TDigitalSurfaceTracker>
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ operator=()
template<typename TDigitalSurfaceTracker>
Assignment.
- Parameters
-
- Returns
- a reference on 'this'. Forbidden by default.
◆ rbegin()
template<typename TDigitalSurfaceTracker>
Iterator service.
- Returns
- rbegin iterator
◆ rc()
template<typename TDigitalSurfaceTracker>
◆ rcstart()
template<typename TDigitalSurfaceTracker>
- Returns
- the reverse circulator on the surfel that was given for initialization.
◆ rend()
template<typename TDigitalSurfaceTracker>
◆ rstart()
template<typename TDigitalSurfaceTracker>
- Returns
- the reverse iterator on the surfel that was given for initialization.
◆ selfDisplay()
template<typename TDigitalSurfaceTracker>
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
◆ size()
template<typename TDigitalSurfaceTracker>
The number of surfels of this slice.
◆ start()
template<typename TDigitalSurfaceTracker>
- Returns
- the iterator on the surfel that was given for initialization.
◆ myIsClosed
template<typename TDigitalSurfaceTracker>
◆ myStart
template<typename TDigitalSurfaceTracker>
◆ mySurfels
template<typename TDigitalSurfaceTracker>
The documentation for this class was generated from the following file: