DGtal  1.3.beta
DigitalSurface2DSlice.h
1 
17 #pragma once
18 
31 #if defined(DigitalSurface2DSlice_RECURSES)
32 #error Recursive header files inclusion detected in DigitalSurface2DSlice.h
33 #else // defined(DigitalSurface2DSlice_RECURSES)
34 
35 #define DigitalSurface2DSlice_RECURSES
36 
37 #if !defined DigitalSurface2DSlice_h
38 
39 #define DigitalSurface2DSlice_h
40 
42 // Inclusions
43 #include <iostream>
44 #include <deque>
45 #include "DGtal/base/Common.h"
46 #include "DGtal/base/Circulator.h"
47 #include "DGtal/topology/DigitalSurface.h"
48 #include "DGtal/topology/CDigitalSurfaceTracker.h"
50 
51 namespace DGtal
52 {
53 
55  // template class DigitalSurface2DSlice
92  template <typename TDigitalSurfaceTracker>
94  {
95  public:
96  typedef TDigitalSurfaceTracker DigitalSurfaceTracker;
98 
100  typedef typename DigitalSurfaceTracker::DigitalSurfaceContainer DigitalSurfaceContainer;
105 
106  typedef std::deque<Surfel> Storage;
107  typedef typename Storage::const_iterator ConstIterator;
108  typedef typename Storage::const_reverse_iterator ConstReverseIterator;
111 
112 
113  // ----------------------- Standard services ------------------------------
114  public:
115 
120 
141 
161  bool init( DigitalSurfaceTracker* tracker, Dimension i );
162 
164  Size size() const;
165 
167  bool isClosed() const;
168 
172  ConstIterator start() const;
173 
179 
183  ConstCirculator cstart() const;
184 
190 
191  // ------------------------- iterator services ----------------------------
192  public:
193 
198  ConstIterator begin() const;
199 
204  ConstIterator end() const;
205 
211 
216  ConstReverseIterator rend() const;
217 
222  ConstCirculator c() const;
223 
228  ConstReverseCirculator rc() const;
229 
230  // ----------------------- Interface --------------------------------------
231  public:
232 
237  void selfDisplay ( std::ostream & out ) const;
238 
243  bool isValid() const;
244 
245  // ------------------------- Protected Datas ------------------------------
246  private:
247  // ------------------------- Private Datas --------------------------------
248  private:
250  std::deque<Surfel> mySurfels;
256  // ------------------------- Hidden services ------------------------------
257  protected:
258 
264 
265  private:
266 
273 
281 
282  // ------------------------- Internals ------------------------------------
283  private:
284 
285  }; // end of class DigitalSurface2DSlice
286 
287 
294  template <typename TDigitalSurfaceTracker>
295  std::ostream&
296  operator<< ( std::ostream & out, const DigitalSurface2DSlice<TDigitalSurfaceTracker> & object );
297 
298 } // namespace DGtal
299 
300 
302 // Includes inline functions.
303 #include "DGtal/topology/DigitalSurface2DSlice.ih"
304 
305 // //
307 
308 #endif // !defined DigitalSurface2DSlice_h
309 
310 #undef DigitalSurface2DSlice_RECURSES
311 #endif // else defined(DigitalSurface2DSlice_RECURSES)
DGtal::DigitalSurface2DSlice::isClosed
bool isClosed() const
DGtal::DigitalSurface2DSlice::Surfel
DigitalSurfaceContainer::Surfel Surfel
Definition: DigitalSurface2DSlice.h:102
DGtal::DigitalSurface2DSlice::ConstCirculator
Circulator< ConstIterator > ConstCirculator
Definition: DigitalSurface2DSlice.h:109
DGtal::DigitalSurface2DSlice::Size
DigitalSurfaceContainer::Size Size
Definition: DigitalSurface2DSlice.h:103
DGtal::DigitalSurface2DSlice::start
ConstIterator start() const
DGtal::Circulator
Aim: Provides an adapter for classical iterators that can iterate through the underlying data structu...
Definition: Circulator.h:85
DGtal::DigitalSurface2DSlice::TheDigitalSurface
DigitalSurface< DigitalSurfaceContainer > TheDigitalSurface
Definition: DigitalSurface2DSlice.h:104
DGtal::DigitalSurface2DSlice::ConstReverseCirculator
Circulator< ConstReverseIterator > ConstReverseCirculator
Definition: DigitalSurface2DSlice.h:110
DGtal::DigitalSurface
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
Definition: DigitalSurface.h:139
DGtal::DigitalSurface2DSlice::rend
ConstReverseIterator rend() const
DGtal::DigitalSurface2DSlice::isValid
bool isValid() const
DGtal::DigitalSurface2DSlice::rcstart
ConstReverseCirculator rcstart() const
DGtal::concepts::CDigitalSurfaceTracker
Aim:
Definition: CDigitalSurfaceTracker.h:85
DGtal::DigitalSurface2DSlice::DigitalSurfaceContainer
DigitalSurfaceTracker::DigitalSurfaceContainer DigitalSurfaceContainer
Definition: DigitalSurface2DSlice.h:100
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::DigitalSurface2DSlice::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::DigitalSurface2DSlice::DigitalSurface2DSlice
DigitalSurface2DSlice()
Size
HalfEdgeDataStructure::Size Size
Definition: testHalfEdgeDataStructure.cpp:50
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::DigitalSurface2DSlice::KSpace
DigitalSurfaceContainer::KSpace KSpace
Definition: DigitalSurface2DSlice.h:101
KSpace
Z3i::KSpace KSpace
Definition: testArithmeticalDSSComputerOnSurfels.cpp:48
DGtal::DigitalSurface2DSlice::ConstIterator
Storage::const_iterator ConstIterator
Definition: DigitalSurface2DSlice.h:107
Surfel
KSpace::SCell Surfel
Definition: testArithmeticalDSSComputerOnSurfels.cpp:50
DGtal::DigitalSurface2DSlice::mySurfels
std::deque< Surfel > mySurfels
The container that stores the surfels of this slice.
Definition: DigitalSurface2DSlice.h:250
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DigitalSurface2DSlice::init
bool init(DigitalSurfaceTracker *tracker, Dimension i)
DGtal::DigitalSurface2DSlice::operator=
DigitalSurface2DSlice & operator=(const DigitalSurface2DSlice &other)
DGtal::DigitalSurface2DSlice::cstart
ConstCirculator cstart() const
DGtal::DigitalSurface2DSlice::myIsClosed
bool myIsClosed
Tells if the slice is closed (true) or open (false).
Definition: DigitalSurface2DSlice.h:252
DGtal::DigitalSurface2DSlice::size
Size size() const
The number of surfels of this slice.
DGtal::DigitalSurface2DSlice::Storage
std::deque< Surfel > Storage
Definition: DigitalSurface2DSlice.h:106
DGtal::DigitalSurface2DSlice::DigitalSurfaceTracker
TDigitalSurfaceTracker DigitalSurfaceTracker
Definition: DigitalSurface2DSlice.h:96
DGtal::DigitalSurface2DSlice::Self
DigitalSurface2DSlice< DigitalSurfaceTracker > Self
Definition: DigitalSurface2DSlice.h:99
DGtal::DigitalSurface2DSlice::rbegin
ConstReverseIterator rbegin() const
DGtal::DigitalSurface2DSlice::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CDigitalSurfaceTracker< DigitalSurfaceTracker >))
DGtal::DigitalSurface2DSlice::rstart
ConstReverseIterator rstart() const
DGtal::DigitalSurface2DSlice
Aim: Represents a 2-dimensional slice in a DigitalSurface. In a sense, it is a 4-connected contour,...
Definition: DigitalSurface2DSlice.h:93
DGtal::DigitalSurface2DSlice::~DigitalSurface2DSlice
~DigitalSurface2DSlice()
DGtal::DigitalSurface2DSlice::c
ConstCirculator c() const
DGtal::DigitalSurface2DSlice::ConstReverseIterator
Storage::const_reverse_iterator ConstReverseIterator
Definition: DigitalSurface2DSlice.h:108
DGtal::DigitalSurface2DSlice::rc
ConstReverseCirculator rc() const
DGtal::DigitalSurface2DSlice::end
ConstIterator end() const
DGtal::DigitalSurface2DSlice::begin
ConstIterator begin() const
DGtal::DigitalSurface2DSlice::myStart
ConstIterator myStart
Definition: DigitalSurface2DSlice.h:255