DGtal
0.6.devel
|
#include <DigitalSurface2DSlice.h>
Public Types | |
typedef TDigitalSurfaceTracker | DigitalSurfaceTracker |
typedef DigitalSurface2DSlice < DigitalSurfaceTracker > | Self |
typedef DigitalSurfaceTracker::DigitalSurfaceContainer | DigitalSurfaceContainer |
typedef DigitalSurfaceContainer::KSpace | KSpace |
typedef DigitalSurfaceContainer::Surfel | Surfel |
typedef DigitalSurfaceContainer::Size | Size |
typedef DigitalSurface < DigitalSurfaceContainer > | TheDigitalSurface |
typedef std::deque< Surfel > | Storage |
typedef Storage::const_iterator | ConstIterator |
typedef Storage::const_reverse_iterator | ConstReverseIterator |
typedef Circulator< ConstIterator > | ConstCirculator |
typedef Circulator < ConstReverseIterator > | ConstReverseCirculator |
Public Member Functions | |
BOOST_CONCEPT_ASSERT ((CDigitalSurfaceTracker< DigitalSurfaceTracker >)) | |
~DigitalSurface2DSlice () | |
DigitalSurface2DSlice (DigitalSurfaceTracker *tracker, Dimension i) | |
bool | init (DigitalSurfaceTracker *tracker, Dimension i) |
Size | size () const |
bool | isClosed () const |
ConstIterator | start () const |
ConstReverseIterator | rstart () const |
ConstCirculator | cstart () const |
ConstReverseCirculator | rcstart () const |
ConstIterator | begin () const |
ConstIterator | end () const |
ConstReverseIterator | rbegin () const |
ConstReverseIterator | rend () const |
ConstCirculator | c () const |
ConstReverseCirculator | rc () const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Protected Member Functions | |
DigitalSurface2DSlice () |
Private Member Functions | |
DigitalSurface2DSlice (const DigitalSurface2DSlice &other) | |
DigitalSurface2DSlice & | operator= (const DigitalSurface2DSlice &other) |
Private Attributes | |
std::deque< Surfel > | mySurfels |
bool | myIsClosed |
ConstIterator | myStart |
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).
TDigitalSurfaceTracker | any model of CDigitalSurfaceTracker: the concrete representation chosen for tracking the digital surface. |
Definition at line 92 of file DigitalSurface2DSlice.h.
typedef Circulator<ConstIterator> DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::ConstCirculator |
Definition at line 108 of file DigitalSurface2DSlice.h.
typedef Storage::const_iterator DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::ConstIterator |
Definition at line 106 of file DigitalSurface2DSlice.h.
typedef Circulator<ConstReverseIterator> DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::ConstReverseCirculator |
Definition at line 109 of file DigitalSurface2DSlice.h.
typedef Storage::const_reverse_iterator DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::ConstReverseIterator |
Definition at line 107 of file DigitalSurface2DSlice.h.
typedef DigitalSurfaceTracker::DigitalSurfaceContainer DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::DigitalSurfaceContainer |
Definition at line 99 of file DigitalSurface2DSlice.h.
typedef TDigitalSurfaceTracker DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::DigitalSurfaceTracker |
Definition at line 95 of file DigitalSurface2DSlice.h.
typedef DigitalSurfaceContainer::KSpace DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::KSpace |
Definition at line 100 of file DigitalSurface2DSlice.h.
typedef DigitalSurface2DSlice<DigitalSurfaceTracker> DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::Self |
Definition at line 98 of file DigitalSurface2DSlice.h.
typedef DigitalSurfaceContainer::Size DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::Size |
Definition at line 102 of file DigitalSurface2DSlice.h.
typedef std::deque<Surfel> DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::Storage |
Definition at line 105 of file DigitalSurface2DSlice.h.
typedef DigitalSurfaceContainer::Surfel DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::Surfel |
Definition at line 101 of file DigitalSurface2DSlice.h.
typedef DigitalSurface<DigitalSurfaceContainer> DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::TheDigitalSurface |
Definition at line 103 of file DigitalSurface2DSlice.h.
|
inline |
|
inline |
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 ).
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. |
NB: O(n) complexity (at least) if n is the number of surfels of the slice.
Definition at line 54 of file DigitalSurface2DSlice.ih.
|
protected |
Constructor. Forbidden by default (protected to avoid g++ warnings).
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
inline |
DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::BOOST_CONCEPT_ASSERT | ( | (CDigitalSurfaceTracker< DigitalSurfaceTracker >) | ) |
|
inline |
|
inline |
Definition at line 148 of file DigitalSurface2DSlice.ih.
|
inline |
bool DGtal::DigitalSurface2DSlice< TDigitalSurfaceTracker >::init | ( | DigitalSurfaceTracker * | tracker, |
Dimension | i | ||
) |
Initializes the slice from a tracker tracker and a direction i.
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. |
NB: O(n) complexity (at least) if n is the number of surfels of the slice.
Definition at line 63 of file DigitalSurface2DSlice.ih.
|
inline |
Definition at line 121 of file DigitalSurface2DSlice.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 241 of file DigitalSurface2DSlice.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
|
inline |
Circulator service.
Definition at line 212 of file DigitalSurface2DSlice.ih.
|
inline |
Definition at line 157 of file DigitalSurface2DSlice.ih.
|
inline |
|
inline |
Definition at line 139 of file DigitalSurface2DSlice.ih.
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 229 of file DigitalSurface2DSlice.ih.
|
inline |
The number of surfels of this slice.
Definition at line 112 of file DigitalSurface2DSlice.ih.
|
inline |
Definition at line 130 of file DigitalSurface2DSlice.ih.
|
private |
Tells if the slice is closed (true) or open (false).
Definition at line 251 of file DigitalSurface2DSlice.h.
|
private |
The iterator on the surfel given at initialization (may be different from begin() if the slice is open.
Definition at line 254 of file DigitalSurface2DSlice.h.
|
private |
The container that stores the surfels of this slice.
Definition at line 249 of file DigitalSurface2DSlice.h.