DGtal
1.5.beta
|
Aim: This class represents a standard digital straight segment (DSS), ie. the sequence of simply 8-connected digital points contained in a naive digital straight line (DSL) between two points of it. This class is an alias of ArithmeticalDSS. More...
#include <DGtal/geometry/curves/ArithmeticalDSS.h>
Public Types | |
typedef ArithmeticalDSS< TCoordinate, TInteger, 8 > | Super |
typedef Super::Point | Point |
typedef Super::Coordinate | Coordinate |
typedef Super::DSL | DSL |
![]() | |
typedef TCoordinate | Coordinate |
typedef TCoordinate | Integer |
typedef ArithmeticalDSL< Coordinate, Integer, adjacency > | DSL |
typedef DSL::Space | Space |
typedef DSL::Point | Point |
typedef DSL::Vector | Vector |
typedef DSL::Steps | Steps |
typedef Coordinate | Position |
typedef DSL::ConstIterator | ConstIterator |
typedef DSL::ConstReverseIterator | ConstReverseIterator |
typedef DGtal::PointVector< 2, double > | PointD |
Public Member Functions | |
NaiveDSS8 (const Coordinate &aA, const Coordinate &aB, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl) | |
NaiveDSS8 (const Point &aF, const Point &aL, const bool &isOnTheUpperLine=true) | |
NaiveDSS8 (const DSL &aDSL, const Point &aF, const Point &aL) | |
NaiveDSS8 (const NaiveDSS8 &aDSS, const Point &aF, const Point &aL) | |
template<typename Iterator > | |
NaiveDSS8 (const Iterator &aItb, const Iterator &aIte) | |
NaiveDSS8 (const NaiveDSS8 &aOther) | |
NaiveDSS8 & | operator= (const NaiveDSS8 &aOther) |
![]() | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< Coordinate >)) | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< Integer >)) | |
ArithmeticalDSS (const Point &aPoint) | |
ArithmeticalDSS (const Coordinate &aA, const Coordinate &aB, const Integer &aLowerBound, const Integer &aUpperBound, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl, const Steps &aSteps, const Vector &aShift) | |
ArithmeticalDSS (const DSL &aDSL, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl) | |
ArithmeticalDSS (const Coordinate &aA, const Coordinate &aB, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl) | |
ArithmeticalDSS (const Point &aF, const Point &aL, const bool &areOnTheUpperLine=true) | |
ArithmeticalDSS (const DSL &aDSL, const Point &aF, const Point &aL) | |
ArithmeticalDSS (const ArithmeticalDSS &aDSS, const Point &aF, const Point &aL) | |
ArithmeticalDSS (const Iterator &aItb, const Iterator &aIte) | |
ArithmeticalDSS (const ArithmeticalDSS &aOther) | |
ArithmeticalDSS & | operator= (const ArithmeticalDSS &aOther) |
ArithmeticalDSS | negate () const |
bool | equalsTo (const ArithmeticalDSS &aOther) const |
bool | operator== (const ArithmeticalDSS &aOther) const |
bool | operator!= (const ArithmeticalDSS &aOther) const |
~ArithmeticalDSS () | |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
const DSL & | dsl () const |
Coordinate | a () const |
Coordinate | b () const |
Integer | mu () const |
Integer | omega () const |
Vector | shift () const |
Steps | steps () const |
Point | back () const |
Point | front () const |
Point | Uf () const |
Point | Ul () const |
Point | Lf () const |
Point | Ll () const |
Integer | remainder (const Point &aPoint) const |
Integer | orthogonalPosition (const Point &aPoint) const |
Position | position (const Point &aPoint) const |
bool | before (const Point &aP1, const Point &aP2) const |
bool | beforeOrEqual (const Point &aP1, const Point &aP2) const |
bool | isInDSL (const Point &aPoint) const |
bool | isInDSL (const DSL &aDSL) const |
bool | isInDSL (const DSL &aDSL, std::vector< Point > &Ulp, std::vector< Point > &Llp, Point &outP) const |
bool | isInDSS (const Point &aPoint) const |
bool | operator() (const Point &aPoint) const |
ArithmeticalDSS | computeUnion (const ArithmeticalDSS &aOther) const |
ConstIterator | begin () const |
ConstIterator | end () const |
ConstReverseIterator | rbegin () const |
ConstReverseIterator | rend () const |
unsigned short int | isExtendableFront (const Point &aNewPoint) const |
unsigned short int | isExtendableBack (const Point &aNewPoint) const |
bool | extendFront (const Point &aNewPoint) |
bool | extendBack (const Point &aNewPoint) |
bool | retractFront () |
bool | retractBack () |
PointD | project (const Point &aM, double aR) const |
PointD | project (const Point &aM, const Point &aP) const |
std::string | className () const |
Additional Inherited Members | |
![]() | |
static const unsigned short | foregroundAdjacency |
![]() | |
bool | retractUpdateLeaningPoints (const Vector &aDirection, const Point &aFirst, const Point &aLast, const Point &aBezout, const Point &aFirstAtOppositeSide, Point &aLastAtOppositeSide, Point &aFirstAtRemovalSide, const Point &aLastAtRemovalSide) |
void | retractUpdateParameters (const Vector &aNewDirection) |
![]() | |
Point | myF |
Point | myL |
Point | myUf |
Point | myUl |
Point | myLf |
Point | myLl |
DSL | myDSL |
Aim: This class represents a standard digital straight segment (DSS), ie. the sequence of simply 8-connected digital points contained in a naive digital straight line (DSL) between two points of it. This class is an alias of ArithmeticalDSS.
A 8-connected naive DSS can be declared and constructed as follows:
You can iterate over the whole set of DSS points as follows:
In addition, you can draw either the points of a DSS or its bounding box with Board2D:
Extending a DSS to a point simply connected to its front is done as follows:
This method implements the algorithm proposed in [Debled and Reveilles, 1995 : [46]].
The following code just undoes the previous extension:
This method implements the algorithm proposed in [Lachaud et. al., 2007 : [74]].
See Digital straight lines and segments
for further details.
TCoordinate | a model of integer for the DGtal point coordinates and the slope parameters. |
TInteger | a model of integer for the intercepts and the remainders that represents a larger range of integers than TCoordinate. |
This class is a model of CPointFunctor and of CConstBidirectionalRange.
Definition at line 968 of file ArithmeticalDSS.h.
typedef Super::Coordinate DGtal::NaiveDSS8< TCoordinate, TInteger >::Coordinate |
Definition at line 974 of file ArithmeticalDSS.h.
typedef Super::DSL DGtal::NaiveDSS8< TCoordinate, TInteger >::DSL |
Definition at line 975 of file ArithmeticalDSS.h.
typedef Super::Point DGtal::NaiveDSS8< TCoordinate, TInteger >::Point |
Definition at line 973 of file ArithmeticalDSS.h.
typedef ArithmeticalDSS<TCoordinate, TInteger, 8> DGtal::NaiveDSS8< TCoordinate, TInteger >::Super |
Definition at line 972 of file ArithmeticalDSS.h.
DGtal::NaiveDSS8< TCoordinate, TInteger >::NaiveDSS8 | ( | const Coordinate & | aA, |
const Coordinate & | aB, | ||
const Point & | aF, | ||
const Point & | aL, | ||
const Point & | aUf, | ||
const Point & | aUl, | ||
const Point & | aLf, | ||
const Point & | aLl | ||
) |
Constructor. Minimal set of parameters to build the DSS in constant time. The user should be sure that the slope is consistent with the position of the leaning points.
aA | y-component of the direction vector |
aB | x-component of the direction vector |
aF | the first point |
aL | the last point |
aUf | the first upper point |
aUl | the last upper point |
aLf | the first lower point |
aLl | the last lower point |
DGtal::NaiveDSS8< TCoordinate, TInteger >::NaiveDSS8 | ( | const Point & | aF, |
const Point & | aL, | ||
const bool & | isOnTheUpperLine = true |
||
) |
Construction of a sequence of patterns (or reversed patterns) from two end points.
aF | the first point |
aL | the last point |
isOnTheUpperLine | boolean equal to 'true' if the two given end points are upper leaning points (pattern case, default), 'false' if they are lower leaning points (reversed pattern case). |
NB: logarithmic-time in the greatest component of the vector starting from aF and pointing to aL
DGtal::NaiveDSS8< TCoordinate, TInteger >::NaiveDSS8 | ( | const DSL & | aDSL, |
const Point & | aF, | ||
const Point & | aL | ||
) |
Construction as the subsegment of minimal parameters of a given DSL.
aDSL | bounding DSL |
aF | first point of the subsegment |
aL | last point of the subsegment |
NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses smartCH algorithm.
DGtal::NaiveDSS8< TCoordinate, TInteger >::NaiveDSS8 | ( | const NaiveDSS8< TCoordinate, TInteger > & | aDSS, |
const Point & | aF, | ||
const Point & | aL | ||
) |
Construction as the subsegment of minimal parameters of a greater DSS.
aDSS | bounding DSS |
aF | first point of the subsegment |
aL | last point of the subsegment |
NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses reversedSmartCH algorithm.
DGtal::NaiveDSS8< TCoordinate, TInteger >::NaiveDSS8 | ( | const Iterator & | aItb, |
const Iterator & | aIte | ||
) |
Construction from a range of iterators on points.
aItb | begin iterator |
aIte | end iterator |
Iterator | a model of forward iterator |
NB: linear-time in the size of the range
DGtal::NaiveDSS8< TCoordinate, TInteger >::NaiveDSS8 | ( | const NaiveDSS8< TCoordinate, TInteger > & | aOther | ) |
Copy constructor.
aOther | the object to clone. |
NaiveDSS8& DGtal::NaiveDSS8< TCoordinate, TInteger >::operator= | ( | const NaiveDSS8< TCoordinate, TInteger > & | aOther | ) |
Assignment.
aOther | the object to copy. |