DGtal  1.1.0
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/CDigitalSurfaceTracker.h"
49 
50 namespace DGtal
51 {
52 
54  // template class DigitalSurface2DSlice
91  template <typename TDigitalSurfaceTracker>
93  {
94  public:
95  typedef TDigitalSurfaceTracker DigitalSurfaceTracker;
97 
99  typedef typename DigitalSurfaceTracker::DigitalSurfaceContainer DigitalSurfaceContainer;
101  typedef typename DigitalSurfaceContainer::Surfel Surfel;
104 
105  typedef std::deque<Surfel> Storage;
106  typedef typename Storage::const_iterator ConstIterator;
107  typedef typename Storage::const_reverse_iterator ConstReverseIterator;
110 
111 
112  // ----------------------- Standard services ------------------------------
113  public:
114 
119 
140 
160  bool init( DigitalSurfaceTracker* tracker, Dimension i );
161 
163  Size size() const;
164 
166  bool isClosed() const;
167 
172 
178 
183 
189 
190  // ------------------------- iterator services ----------------------------
191  public:
192 
198 
204 
210 
216 
222 
228 
229  // ----------------------- Interface --------------------------------------
230  public:
231 
236  void selfDisplay ( std::ostream & out ) const;
237 
242  bool isValid() const;
243 
244  // ------------------------- Protected Datas ------------------------------
245  private:
246  // ------------------------- Private Datas --------------------------------
247  private:
249  std::deque<Surfel> mySurfels;
255  // ------------------------- Hidden services ------------------------------
256  protected:
257 
263 
264  private:
265 
272 
280 
281  // ------------------------- Internals ------------------------------------
282  private:
283 
284  }; // end of class DigitalSurface2DSlice
285 
286 
293  template <typename TDigitalSurfaceTracker>
294  std::ostream&
295  operator<< ( std::ostream & out, const DigitalSurface2DSlice<TDigitalSurfaceTracker> & object );
296 
297 } // namespace DGtal
298 
299 
301 // Includes inline functions.
302 #include "DGtal/topology/DigitalSurface2DSlice.ih"
303 
304 // //
306 
307 #endif // !defined DigitalSurface2DSlice_h
308 
309 #undef DigitalSurface2DSlice_RECURSES
310 #endif // else defined(DigitalSurface2DSlice_RECURSES)
DGtal::DigitalSurface2DSlice::isClosed
bool isClosed() const
KSpace
Z3i::KSpace KSpace
Definition: sphereCotangentLaplaceOperator.cpp:70
DGtal::DigitalSurface2DSlice::Surfel
DigitalSurfaceContainer::Surfel Surfel
Definition: DigitalSurface2DSlice.h:101
DGtal::DigitalSurface2DSlice::ConstCirculator
Circulator< ConstIterator > ConstCirculator
Definition: DigitalSurface2DSlice.h:108
DGtal::DigitalSurface2DSlice::Size
DigitalSurfaceContainer::Size Size
Definition: DigitalSurface2DSlice.h:102
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:86
DGtal::DigitalSurface2DSlice::TheDigitalSurface
DigitalSurface< DigitalSurfaceContainer > TheDigitalSurface
Definition: DigitalSurface2DSlice.h:103
DGtal::DigitalSurface2DSlice::ConstReverseCirculator
Circulator< ConstReverseIterator > ConstReverseCirculator
Definition: DigitalSurface2DSlice.h:109
DGtal::DigitalSurface
Aim: Represents a set of n-1-cells in a nD space, together with adjacency relation between these cell...
Definition: DigitalSurface.h:140
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:86
DGtal::DigitalSurface2DSlice::DigitalSurfaceContainer
DigitalSurfaceTracker::DigitalSurfaceContainer DigitalSurfaceContainer
Definition: DigitalSurface2DSlice.h:99
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:133
DGtal::DigitalSurface2DSlice::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::DigitalSurface2DSlice::DigitalSurface2DSlice
DigitalSurface2DSlice()
Size
HalfEdgeDataStructure::Size Size
Definition: testHalfEdgeDataStructure.cpp:50
DGtal::DigitalSurface2DSlice::KSpace
DigitalSurfaceContainer::KSpace KSpace
Definition: DigitalSurface2DSlice.h:100
DGtal::DigitalSurface2DSlice::ConstIterator
Storage::const_iterator ConstIterator
Definition: DigitalSurface2DSlice.h:106
DGtal::DigitalSurface2DSlice::mySurfels
std::deque< Surfel > mySurfels
The container that stores the surfels of this slice.
Definition: DigitalSurface2DSlice.h:249
DGtal::DigitalSurface2DSlice::DigitalSurface2DSlice
DigitalSurface2DSlice(DigitalSurfaceTracker *tracker, Dimension i)
DGtal::DigitalSurface2DSlice::DigitalSurface2DSlice
DigitalSurface2DSlice(const DigitalSurface2DSlice &other)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
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:251
DGtal::DigitalSurface2DSlice::size
Size size() const
The number of surfels of this slice.
DGtal::DigitalSurface2DSlice::Storage
std::deque< Surfel > Storage
Definition: DigitalSurface2DSlice.h:105
DGtal::DigitalSurface2DSlice::DigitalSurfaceTracker
TDigitalSurfaceTracker DigitalSurfaceTracker
Definition: DigitalSurface2DSlice.h:95
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::DigitalSurface2DSlice::Self
DigitalSurface2DSlice< DigitalSurfaceTracker > Self
Definition: DigitalSurface2DSlice.h:98
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:107
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:254