DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ArithmeticalDSS3d.h
1 
17 #pragma once
18 
36 #if defined(ArithmeticalDSS3d_RECURSES)
37 #error Recursive header files inclusion detected in ArithmeticalDSS3d.h
38 #else // defined(ArithmeticalDSS3d_RECURSES)
39 
40 #define ArithmeticalDSS3d_RECURSES
41 
42 #if !defined ArithmeticalDSS3d_h
43 
44 #define ArithmeticalDSS3d_h
45 
47 // Inclusions
48 #include <iostream>
49 #include <list>
50 #include "DGtal/base/Exceptions.h"
51 #include "DGtal/base/Common.h"
52 #include "DGtal/kernel/PointVector.h"
53 #include "DGtal/kernel/CInteger.h"
54 #include "DGtal/geometry/curves/ArithmeticalDSS.h"
55 #include "DGtal/base/ConstIteratorAdapter.h"
56 #include "DGtal/kernel/BasicPointFunctors.h"
57 
59 
60 
61 namespace DGtal
62 {
63 
64 
66  // class ArithmeticalDSS3d
73  template <typename TIterator, typename TInteger, int connectivity>
75  {
76 
77  // ----------------------- Types ------------------------------
78  public:
79 
80 
81  //entier
83  typedef TInteger Integer;
84 
85 
86  //requiered types
87  typedef TIterator ConstIterator;
90 
91 
92  //points and vectors
95  typedef typename Point3d::Coordinate Coordinate;
96 
99 
103 
104  // adapters for iterator
106 
108 
109 
110  //2d-arithmeticalDSS recognition algorithm
112 
113 
114  // ----------------------- Standard services ------------------------------
115  public:
116 
117 
123 
129  ArithmeticalDSS3d(const ConstIterator& it);
130 
135  void init(const ConstIterator& it);
136 
137 
142  ArithmeticalDSS3d ( const ArithmeticalDSS3d & other );
143 
150 
154  Self getSelf() const;
155 
159  Reverse getReverse() const;
160 
161 
162 
171  bool operator==( const ArithmeticalDSS3d & other ) const;
172 
179  bool operator!=( const ArithmeticalDSS3d & other ) const;
180 
185 
186  // ----------------------- Interface --------------------------------------
187  public:
188 
189 
196  bool extendForward();
197 
198 
204  bool isExtendableForward();
205 
206  // ------------------------- Accessors ------------------------------
207 
216  void getParameters(Vector3d& direction, PointD3d& intercept, PointD3d& thickness) const;
217 
222  bool isValid() const;
223 
224 
229  ConstIterator begin() const;
233  ConstIterator end() const;
234 
235 
236  // ------------------ Display ------------------------------------------
237 
238  public:
239 
243  std::string className() const;
244 
249  void selfDisplay ( std::ostream & out ) ;
250 
251  // ------------------------- Protected Datas ------------------------------
252  protected:
253 
256 
261 
264 
265 
266  // ------------------------- Private Datas --------------------------------
267 
268  private:
269 
270 
271  }; // end of class ArithmeticalDSS3d
272 
273 
274 
281  template <typename TIterator, typename TInteger, int connectivity>
282  std::ostream&
283  operator<< ( std::ostream & out, ArithmeticalDSS3d<TIterator,TInteger,connectivity> & object )
284  {
285  object.selfDisplay( out);
286  return out;
287  }
288 
289 
290 } // namespace DGtal
291 
292 
293 
295 // Includes inline functions/methods.
296 #include "DGtal/geometry/curves/ArithmeticalDSS3d.ih"
297 
298 // //
300 
301 #endif // !defined ArithmeticalDSS3d_h
302 
303 #undef ArithmeticalDSS3d_RECURSES
304 #endif // else defined(ArithmeticalDSS3d_RECURSES)