DGtal  1.0.0
StandardDSS6Computer.h
1 
17 #pragma once
18 
36 #if defined(StandardDSS6Computer_RECURSES)
37 #error Recursive header files inclusion detected in StandardDSS6Computer.h
38 #else // defined(StandardDSS6Computer_RECURSES)
39 
40 #define StandardDSS6Computer_RECURSES
41 
42 #if !defined StandardDSS6Computer_h
43 
44 #define StandardDSS6Computer_h
45 
47 // Inclusions
48 #include <iostream>
49 #include <list>
50 #include <utility>
51 #include <boost/array.hpp>
52 #include "DGtal/base/Exceptions.h"
53 #include "DGtal/base/Common.h"
54 #include "DGtal/kernel/PointVector.h"
55 #include "DGtal/kernel/CInteger.h"
56 #include "DGtal/geometry/curves/ArithmeticalDSSComputer.h"
57 #include "DGtal/base/ConstIteratorAdapter.h"
58 #include "DGtal/kernel/BasicPointFunctors.h"
59 
61 
62 
63 namespace DGtal
64 {
65 
66 
68  // class StandardDSS6Computer
75  template <typename TIterator, typename TInteger, int connectivity>
77  {
79 
80  // ----------------------- Types ------------------------------
81  public:
83  typedef TInteger Integer;
85  typedef std::pair <Integer, Integer> Quotient;
87  typedef TIterator ConstIterator;
97  typedef typename Point3d::Coordinate Coordinate;
101  typedef boost::array< Quotient, 3 > PointR3d;
108 
109  // ----------------------- Standard services ------------------------------
110  public:
111 
112 
118 
125 
130  void init(const ConstIterator& it);
131 
132 
137  StandardDSS6Computer ( const StandardDSS6Computer & other );
138 
145 
149  Self getSelf() const;
150 
154  Reverse getReverse() const;
155 
161  bool isInDSS ( const Point3d& aPoint ) const;
162 
168  bool isInDSS ( const ConstIterator & it ) const;
169 
178  bool operator==( const StandardDSS6Computer & other ) const;
179 
186  bool operator!=( const StandardDSS6Computer & other ) const;
187 
192 
193  // ----------------------- Interface --------------------------------------
194  public:
195 
196 
203  bool extendFront();
204 
205 
211  bool isExtendableFront();
212 
213  // ------------------------- Accessors ------------------------------
214 
223  void getParameters ( Vector3d& direction, PointR3d& intercept, PointR3d& thickness ) const;
224 
229  bool isValid() const;
230 
231 
236  ConstIterator begin() const;
240  ConstIterator end() const;
241 
247 
253 
259 
266 
267 
268  // ------------------ Display ------------------------------------------
269 
270  public:
271 
275  std::string className() const;
276 
281  void selfDisplay ( std::ostream & out ) const;
282 
283  // ------------------------- Protected Datas ------------------------------
284  protected:
285 
288 
293 
296 
297 
298  // ------------------------- Private Datas --------------------------------
299 
300  private:
301 
302 
303  }; // end of class StandardDSS6Computer
304 
305 
306 
313  template <typename TIterator, typename TInteger, int connectivity>
314  std::ostream&
316  {
317  object.selfDisplay( out);
318  return out;
319  }
320 
321 
322 } // namespace DGtal
323 
324 
325 
327 // Includes inline functions/methods.
328 #include "DGtal/geometry/curves/StandardDSS6Computer.ih"
329 
330 // //
332 
333 #endif // !defined StandardDSS6Computer_h
334 
335 #undef StandardDSS6Computer_RECURSES
336 #endif // else defined(StandardDSS6Computer_RECURSES)
void getParameters(Vector3d &direction, PointR3d &intercept, PointR3d &thickness) const
const Point aPoint(3, 4)
Point3d::Coordinate Coordinate
Type of 3d digital point coordinate.
ConstIterator end() const
This class adapts any iterator so that operator* returns another element than the one pointed to by t...
MyDigitalSurface::ConstIterator ConstIterator
bool operator==(const StandardDSS6Computer &other) const
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
void selfDisplay(std::ostream &out) const
DGtal::uint32_t Dimension
Definition: Common.h:127
std::string className() const
const ArithmeticalDSSComputer2d & arithmeticalDSS2dXY() const
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:165
StandardDSS6Computer & operator=(const StandardDSS6Computer &other)
ConstIteratorAdapter< ConstIterator, Projector2d, Point2d > IteratorAdapter
Iterator over adapter.
DGtal::PointVector< 2, Coordinate > Point2d
Type of 2d digital point.
ConstIterator myBegin
begin and end iterators
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:87
const ArithmeticalDSSComputer2d & arithmeticalDSS2d(Dimension i) const
std::pair< Integer, Integer > Quotient
Type which represent quotient of two integers first/second.
DGtal::ArithmeticalDSSComputer< IteratorAdapter, TInteger, connectivity > ArithmeticalDSSComputer2d
2D arithmetical DSS recognition algorithm
const ArithmeticalDSSComputer2d & arithmeticalDSS2dYZ() const
IteratorCirculatorTraits< ConstIterator >::Value Vector3d
Type of 3d digital vector.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
bool isInDSS(const Point3d &aPoint) const
TInteger Integer
Type of integer, devoted to remainders (and intercepts)
StandardDSS6Computer< ReverseIterator< ConstIterator >, TInteger, connectivity > Reverse
Reverse type.
Reverse getReverse() const
DGtal is the top-level namespace which contains all DGtal functions and types.
ArithmeticalDSSComputer2d myXZalgo
functors::Projector< SpaceND< 2, Coordinate > > Projector2d
Adapter for iterators.
ArithmeticalDSSComputer2d myYZalgo
void init(const ConstIterator &it)
bool operator!=(const StandardDSS6Computer &other) const
const ArithmeticalDSSComputer2d & arithmeticalDSS2dXZ() const
StandardDSS6Computer< ConstIterator, TInteger, connectivity > Self
Self type.
ArithmeticalDSSComputer2d myXYalgo
2d-arithmeticalDSS recognition algorithms
Projector2d myProjXY
projectors
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
ConstIterator begin() const
boost::array< Quotient, 3 > PointR3d
Type of 3d rational point.
IteratorCirculatorTraits< ConstIterator >::Value Point3d
Type of 3d digital point.
TIterator ConstIterator
Type of iterator, at least readable and forward.