DGtal  1.1.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 
138 
145 
149  Self getSelf() const;
150 
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 
212 
213  // ------------------------- Accessors ------------------------------
214 
223  void getParameters ( Vector3d& direction, PointR3d& intercept, PointR3d& thickness ) const;
224 
229  bool isValid() const;
230 
231 
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&
315  operator<< ( std::ostream & out, const StandardDSS6Computer<TIterator,TInteger,connectivity> & object )
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)
DGtal::functors::Projector
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...
Definition: BasicPointFunctors.h:107
DGtal::StandardDSS6Computer::myXYalgo
ArithmeticalDSSComputer2d myXYalgo
2d-arithmeticalDSS recognition algorithms
Definition: StandardDSS6Computer.h:290
DGtal::StandardDSS6Computer::isInDSS
bool isInDSS(const ConstIterator &it) const
DGtal::StandardDSS6Computer::begin
ConstIterator begin() const
DGtal::StandardDSS6Computer::getParameters
void getParameters(Vector3d &direction, PointR3d &intercept, PointR3d &thickness) const
DGtal::StandardDSS6Computer::myEnd
ConstIterator myEnd
Definition: StandardDSS6Computer.h:295
DGtal::concepts::CInteger
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:88
DGtal::ArithmeticalDSSComputer< IteratorAdapter, TInteger, connectivity >
DGtal::StandardDSS6Computer::ConstIterator
TIterator ConstIterator
Type of iterator, at least readable and forward.
Definition: StandardDSS6Computer.h:87
DGtal::StandardDSS6Computer::arithmeticalDSS2dXY
const ArithmeticalDSSComputer2d & arithmeticalDSS2dXY() const
DGtal::StandardDSS6Computer::operator=
StandardDSS6Computer & operator=(const StandardDSS6Computer &other)
DGtal::StandardDSS6Computer::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::StandardDSS6Computer::StandardDSS6Computer
StandardDSS6Computer(const ConstIterator &it)
DGtal::StandardDSS6Computer::Point2d
DGtal::PointVector< 2, Coordinate > Point2d
Type of 2d digital point.
Definition: StandardDSS6Computer.h:99
aPoint
const Point aPoint(3, 4)
DGtal::StandardDSS6Computer::myProjYZ
Projector2d myProjYZ
Definition: StandardDSS6Computer.h:287
DGtal::StandardDSS6Computer::myBegin
ConstIterator myBegin
begin and end iterators
Definition: StandardDSS6Computer.h:295
DGtal::StandardDSS6Computer::myProjXZ
Projector2d myProjXZ
Definition: StandardDSS6Computer.h:287
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:133
DGtal::StandardDSS6Computer::operator==
bool operator==(const StandardDSS6Computer &other) const
DGtal::StandardDSS6Computer::IteratorAdapter
ConstIteratorAdapter< ConstIterator, Projector2d, Point2d > IteratorAdapter
Iterator over adapter.
Definition: StandardDSS6Computer.h:105
DGtal::StandardDSS6Computer::Quotient
std::pair< Integer, Integer > Quotient
Type which represent quotient of two integers first/second.
Definition: StandardDSS6Computer.h:85
DGtal::StandardDSS6Computer::ArithmeticalDSSComputer2d
DGtal::ArithmeticalDSSComputer< IteratorAdapter, TInteger, connectivity > ArithmeticalDSSComputer2d
2D arithmetical DSS recognition algorithm
Definition: StandardDSS6Computer.h:107
DGtal::StandardDSS6Computer::arithmeticalDSS2dYZ
const ArithmeticalDSSComputer2d & arithmeticalDSS2dYZ() const
DGtal::StandardDSS6Computer::arithmeticalDSS2d
const ArithmeticalDSSComputer2d & arithmeticalDSS2d(Dimension i) const
DGtal::StandardDSS6Computer::className
std::string className() const
DGtal::StandardDSS6Computer::isExtendableFront
bool isExtendableFront()
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::StandardDSS6Computer::Vector3d
IteratorCirculatorTraits< ConstIterator >::Value Vector3d
Type of 3d digital vector.
Definition: StandardDSS6Computer.h:95
DGtal::StandardDSS6Computer::Reverse
StandardDSS6Computer< ReverseIterator< ConstIterator >, TInteger, connectivity > Reverse
Reverse type.
Definition: StandardDSS6Computer.h:91
DGtal::StandardDSS6Computer
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Definition: StandardDSS6Computer.h:77
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::StandardDSS6Computer::Integer
TInteger Integer
Type of integer, devoted to remainders (and intercepts)
Definition: StandardDSS6Computer.h:83
DGtal::StandardDSS6Computer::Self
StandardDSS6Computer< ConstIterator, TInteger, connectivity > Self
Self type.
Definition: StandardDSS6Computer.h:89
DGtal::StandardDSS6Computer::~StandardDSS6Computer
~StandardDSS6Computer()
Definition: StandardDSS6Computer.h:191
DGtal::StandardDSS6Computer::getReverse
Reverse getReverse() const
DGtal::StandardDSS6Computer::isInDSS
bool isInDSS(const Point3d &aPoint) const
DGtal::StandardDSS6Computer::myYZalgo
ArithmeticalDSSComputer2d myYZalgo
Definition: StandardDSS6Computer.h:292
DGtal::StandardDSS6Computer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
DGtal::StandardDSS6Computer::isValid
bool isValid() const
DGtal::PointVector
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
DGtal::StandardDSS6Computer::Projector2d
functors::Projector< SpaceND< 2, Coordinate > > Projector2d
Adapter for iterators.
Definition: StandardDSS6Computer.h:103
DGtal::StandardDSS6Computer::Point3d
IteratorCirculatorTraits< ConstIterator >::Value Point3d
Type of 3d digital point.
Definition: StandardDSS6Computer.h:93
DGtal::StandardDSS6Computer::myProjXY
Projector2d myProjXY
projectors
Definition: StandardDSS6Computer.h:287
DGtal::StandardDSS6Computer::StandardDSS6Computer
StandardDSS6Computer(const StandardDSS6Computer &other)
DGtal::StandardDSS6Computer::myXZalgo
ArithmeticalDSSComputer2d myXZalgo
Definition: StandardDSS6Computer.h:291
DGtal::StandardDSS6Computer::getSelf
Self getSelf() const
DGtal::StandardDSS6Computer::extendFront
bool extendFront()
DGtal::StandardDSS6Computer::PointR3d
boost::array< Quotient, 3 > PointR3d
Type of 3d rational point.
Definition: StandardDSS6Computer.h:101
DGtal::StandardDSS6Computer::operator!=
bool operator!=(const StandardDSS6Computer &other) const
DGtal::StandardDSS6Computer::init
void init(const ConstIterator &it)
DGtal::IteratorCirculatorTraits::Value
IC::value_type Value
Definition: IteratorCirculatorTraits.h:303
DGtal::StandardDSS6Computer::Coordinate
Point3d::Coordinate Coordinate
Type of 3d digital point coordinate.
Definition: StandardDSS6Computer.h:97
DGtal::StandardDSS6Computer::StandardDSS6Computer
StandardDSS6Computer()
DGtal::ConstIteratorAdapter
This class adapts any iterator so that operator* returns another element than the one pointed to by t...
Definition: ConstIteratorAdapter.h:88
DGtal::StandardDSS6Computer::end
ConstIterator end() const
DGtal::StandardDSS6Computer::arithmeticalDSS2dXZ
const ArithmeticalDSSComputer2d & arithmeticalDSS2dXZ() const