DGtal 1.3.0
|
Aim: Dynamic recognition of a 3d-digital straight segment (DSS) More...
#include <DGtal/geometry/curves/Naive3DDSSComputer.h>
Public Types | |
typedef TInteger | Integer |
Type of integer, devoted to remainders (and intercepts) More... | |
typedef std::pair< Integer, Integer > | Quotient |
Type which represent quotient of two integers first/second. More... | |
typedef TIterator | ConstIterator |
Type of iterator, at least readable and forward. More... | |
typedef Naive3DDSSComputer< ConstIterator, TInteger, connectivity > | Self |
Self type. More... | |
typedef Naive3DDSSComputer< ReverseIterator< ConstIterator >, TInteger, connectivity > | Reverse |
Reverse type. More... | |
typedef IteratorCirculatorTraits< ConstIterator >::Value | Point3d |
Type of 3d digital point. More... | |
typedef IteratorCirculatorTraits< ConstIterator >::Value | Vector3d |
Type of 3d digital vector. More... | |
typedef Point3d::Coordinate | Coordinate |
Type of 3d digital point coordinate. More... | |
typedef DGtal::PointVector< 2, Coordinate > | Point2d |
Type of 2d digital point. More... | |
typedef std::array< Quotient, 3 > | PointR3d |
Type of 3d rational point. More... | |
typedef functors::Projector< SpaceND< 2, Coordinate > > | Projector2d |
Adapter for iterators. More... | |
typedef ConstIteratorAdapter< ConstIterator, Projector2d, Point2d > | IteratorAdapter |
Iterator over adapter. More... | |
typedef DGtal::ArithmeticalDSSComputer< IteratorAdapter, TInteger, connectivity > | ArithmeticalDSSComputer2d |
2D arithmetical DSS recognition algorithm More... | |
Protected Attributes | |
Projector2d | myProjXY |
Projector for XY-plane. More... | |
Projector2d | myProjXZ |
Projector for XZ-plane. More... | |
Projector2d | myProjYZ |
Projector for YZ-plane. More... | |
ArithmeticalDSSComputer2d | myXYalgo |
2d-arithmeticalDSS recognition algorithms for XY-plane. More... | |
ArithmeticalDSSComputer2d | myXZalgo |
2d-arithmeticalDSS recognition algorithms for XZ-plane. More... | |
ArithmeticalDSSComputer2d | myYZalgo |
2d-arithmeticalDSS recognition algorithms for YZ-plane. More... | |
bool | blockXY |
bool | blockXZ |
bool | blockYZ |
ConstIterator | myBegin |
begin and end iterators More... | |
ConstIterator | myEnd |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >)) | |
bool | extendFront (ArithmeticalDSSComputer2d &DSS2D, bool &blocked) |
Aim: Dynamic recognition of a 3d-digital straight segment (DSS)
Description of class 'Naive3DDSSComputer' model of CForwardSegmentComputer
Aim: This class is a wrapper around ArithmeticalDSSComputer that is devoted to the dynamic recognition of digital straight segments in 2D (DSS), along any sequence of digital points.
Naive3DDSSComputer projects 3d curve onto three orthogonal planes. Then each projection is segmented while using ArithmeticalDSSComputer, as long as at least two such segmentations along projected curves are valid. By valid we understand, there is no—at least—two 3d points which have same projection onto one of the orthogonal 2d planes.
TIterator | type of iterator on 3d digital points, readable and forward. |
TInteger | type of integers used for the computation of remainders, which is a model of CInteger. |
connectivity | of the projected DSS (simply 4-connected) curve or 8 for naive (simply 8-connected) curve (default). Corresponds to adjacency of 2d projections (see above). Notice that choosing 8-adjacency for each 2d projection onto orthogonal planes means that 3d curve is 26-connected. While 4-adjacency means that 3d curve is 6-connected. |
This class is a model of CForwardSegmentComputer. It is also default constructible, copy constructible, assignable and equality comparable.
Definition at line 97 of file Naive3DDSSComputer.h.
typedef DGtal::ArithmeticalDSSComputer< IteratorAdapter, TInteger, connectivity > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::ArithmeticalDSSComputer2d |
2D arithmetical DSS recognition algorithm
Definition at line 127 of file Naive3DDSSComputer.h.
typedef TIterator DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::ConstIterator |
Type of iterator, at least readable and forward.
Definition at line 107 of file Naive3DDSSComputer.h.
typedef Point3d::Coordinate DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Coordinate |
Type of 3d digital point coordinate.
Definition at line 117 of file Naive3DDSSComputer.h.
typedef TInteger DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Integer |
Type of integer, devoted to remainders (and intercepts)
Definition at line 103 of file Naive3DDSSComputer.h.
typedef ConstIteratorAdapter< ConstIterator, Projector2d, Point2d > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::IteratorAdapter |
Iterator over adapter.
Definition at line 125 of file Naive3DDSSComputer.h.
typedef DGtal::PointVector< 2, Coordinate > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Point2d |
Type of 2d digital point.
Definition at line 119 of file Naive3DDSSComputer.h.
typedef IteratorCirculatorTraits<ConstIterator>::Value DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Point3d |
Type of 3d digital point.
Definition at line 113 of file Naive3DDSSComputer.h.
typedef std::array< Quotient, 3 > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::PointR3d |
Type of 3d rational point.
Definition at line 121 of file Naive3DDSSComputer.h.
typedef functors::Projector< SpaceND< 2, Coordinate > > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Projector2d |
Adapter for iterators.
Definition at line 123 of file Naive3DDSSComputer.h.
typedef std::pair<Integer, Integer> DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Quotient |
Type which represent quotient of two integers first/second.
Definition at line 105 of file Naive3DDSSComputer.h.
typedef Naive3DDSSComputer< ReverseIterator< ConstIterator >,TInteger, connectivity > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Reverse |
Reverse type.
Definition at line 111 of file Naive3DDSSComputer.h.
typedef Naive3DDSSComputer< ConstIterator, TInteger, connectivity > DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Self |
Self type.
Definition at line 109 of file Naive3DDSSComputer.h.
typedef IteratorCirculatorTraits<ConstIterator>::Value DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Vector3d |
Type of 3d digital vector.
Definition at line 115 of file Naive3DDSSComputer.h.
DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Naive3DDSSComputer | ( | ) |
Default constructor. not valid
DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Naive3DDSSComputer | ( | const ConstIterator & | it | ) |
DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::Naive3DDSSComputer | ( | const Naive3DDSSComputer< TIterator, TInteger, connectivity > & | other | ) |
Copy constructor.
other | the object to clone. |
|
inline |
const ArithmeticalDSSComputer2d & DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::arithmeticalDSS2d | ( | Dimension | i | ) | const |
i | the axis orthogonal to the plane i = 0 -> YZ-plane i = 1 -> XZ-plane i = 2 -> XY-plane |
const ArithmeticalDSSComputer2d & DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::arithmeticalDSS2dXY | ( | ) | const |
const ArithmeticalDSSComputer2d & DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::arithmeticalDSS2dXZ | ( | ) | const |
const ArithmeticalDSSComputer2d & DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::arithmeticalDSS2dYZ | ( | ) | const |
ConstIterator DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::begin | ( | ) | const |
|
private |
std::string DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::className | ( | ) | const |
ConstIterator DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::end | ( | ) | const |
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::extendFront | ( | ) |
Tests whether the current DSS can be extended at the front. Computes the parameters of the extended DSS if yes and adds the point to the current DSS in this case.
|
private |
Tests whether the current 2d-DSS can be extended at the front. Computes the parameters of the extended 2d-DSS if yes and adds the point to the current 2d-DSS in this case. Used internally to simplify extendFront().
DSS2D | reference to 2d-DSSComputer |
blocked | reference to status of DSS2D updated if DSS2D cannot be extended at the front. |
void DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::getParameters | ( | Vector3d & | direction, |
PointR3d & | intercept, | ||
PointR3d & | thickness | ||
) | const |
Computes the parameters (direction, intercept, thickness) of the DSS
direction | direction vector calculated from 2D valid DSS. |
intercept | intercept calculated from mu-parameters of 2D valid DSS. |
thickness | thickness calculated from omega-parameters of 2D valid DSS. |
Reverse DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::getReverse | ( | ) | const |
Self DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::getSelf | ( | ) | const |
void DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::init | ( | const ConstIterator & | it | ) |
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::isExtendableFront | ( | ) |
Tests whether the 3d DSS can be extended at the front.
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::isInDSS | ( | const ConstIterator & | it | ) | const |
Checks whether a point belongs to the DSS or not
it | an iterator on the point to be checked |
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::isInDSS | ( | const Point3d & | aPoint | ) | const |
Checks whether a point belongs to the DSS or not
aPoint | the point to be checked |
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::operator!= | ( | const Naive3DDSSComputer< TIterator, TInteger, connectivity > & | other | ) | const |
Difference operator.
other | the object to compare with. |
Naive3DDSSComputer & DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::operator= | ( | const Naive3DDSSComputer< TIterator, TInteger, connectivity > & | other | ) |
Assignment.
other | the object to copy. |
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::operator== | ( | const Naive3DDSSComputer< TIterator, TInteger, connectivity > & | other | ) | const |
Equality operator.
other | the object to compare with. |
void DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::selfDisplay | ( | std::ostream & | out | ) |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
bool DGtal::Naive3DDSSComputer< TIterator, TInteger, connectivity >::validArithmeticalDSS2d | ( | Dimension | i | ) | const |
i | the axis orthogonal to the plane i = 0 -> YZ-plane i = 1 -> XZ-plane i = 2 -> XY-plane |
|
protected |
Used internally to store information which 2d-arithemticalDSS should not be any more extended. This happened when two successive 3D points have same projections onto respective 2d plane.
Definition at line 349 of file Naive3DDSSComputer.h.
|
protected |
Definition at line 349 of file Naive3DDSSComputer.h.
|
protected |
Definition at line 349 of file Naive3DDSSComputer.h.
|
protected |
begin and end iterators
Definition at line 352 of file Naive3DDSSComputer.h.
|
protected |
Definition at line 352 of file Naive3DDSSComputer.h.
|
protected |
Projector for XY-plane.
Definition at line 331 of file Naive3DDSSComputer.h.
|
protected |
Projector for XZ-plane.
Definition at line 333 of file Naive3DDSSComputer.h.
|
protected |
Projector for YZ-plane.
Definition at line 335 of file Naive3DDSSComputer.h.
|
protected |
2d-arithmeticalDSS recognition algorithms for XY-plane.
Definition at line 338 of file Naive3DDSSComputer.h.
|
protected |
2d-arithmeticalDSS recognition algorithms for XZ-plane.
Definition at line 340 of file Naive3DDSSComputer.h.
|
protected |
2d-arithmeticalDSS recognition algorithms for YZ-plane.
Definition at line 342 of file Naive3DDSSComputer.h.