DGtal 1.3.0
Loading...
Searching...
No Matches
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)
40#define StandardDSS6Computer_RECURSES
41
42#if !defined StandardDSS6Computer_h
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
63namespace 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
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)
This class adapts any iterator so that operator* returns another element than the one pointed to by t...
Aim: Implements basic operations that will be used in Point and Vector classes.
Definition: PointVector.h:593
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
ConstIteratorAdapter< ConstIterator, Projector2d, Point2d > IteratorAdapter
Iterator over adapter.
functors::Projector< SpaceND< 2, Coordinate > > Projector2d
Adapter for iterators.
ConstIterator end() const
StandardDSS6Computer< ConstIterator, TInteger, connectivity > Self
Self type.
IteratorCirculatorTraits< ConstIterator >::Value Point3d
Type of 3d digital point.
ArithmeticalDSSComputer2d myXYalgo
2d-arithmeticalDSS recognition algorithms
ConstIterator begin() const
DGtal::ArithmeticalDSSComputer< IteratorAdapter, TInteger, connectivity > ArithmeticalDSSComputer2d
2D arithmetical DSS recognition algorithm
const ArithmeticalDSSComputer2d & arithmeticalDSS2dYZ() const
ArithmeticalDSSComputer2d myXZalgo
Projector2d myProjXY
projectors
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
TInteger Integer
Type of integer, devoted to remainders (and intercepts)
Reverse getReverse() const
std::pair< Integer, Integer > Quotient
Type which represent quotient of two integers first/second.
Point3d::Coordinate Coordinate
Type of 3d digital point coordinate.
TIterator ConstIterator
Type of iterator, at least readable and forward.
StandardDSS6Computer(const StandardDSS6Computer &other)
const ArithmeticalDSSComputer2d & arithmeticalDSS2dXY() const
void init(const ConstIterator &it)
bool isInDSS(const ConstIterator &it) const
void getParameters(Vector3d &direction, PointR3d &intercept, PointR3d &thickness) const
const ArithmeticalDSSComputer2d & arithmeticalDSS2dXZ() const
bool operator==(const StandardDSS6Computer &other) const
StandardDSS6Computer(const ConstIterator &it)
StandardDSS6Computer & operator=(const StandardDSS6Computer &other)
bool operator!=(const StandardDSS6Computer &other) const
IteratorCirculatorTraits< ConstIterator >::Value Vector3d
Type of 3d digital vector.
boost::array< Quotient, 3 > PointR3d
Type of 3d rational point.
void selfDisplay(std::ostream &out) const
ConstIterator myBegin
begin and end iterators
DGtal::PointVector< 2, Coordinate > Point2d
Type of 2d digital point.
StandardDSS6Computer< ReverseIterator< ConstIterator >, TInteger, connectivity > Reverse
Reverse type.
std::string className() const
bool isInDSS(const Point3d &aPoint) const
const ArithmeticalDSSComputer2d & arithmeticalDSS2d(Dimension i) const
ArithmeticalDSSComputer2d myYZalgo
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::uint32_t Dimension
Definition: Common.h:137
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Definition: CInteger.h:88
Aim: Functor that maps a point P of dimension i to a point Q of dimension j. The member myDims is an ...
const Point aPoint(3, 4)