DGtal 1.4.0
|
Aim: This class represents a standard digital straight segment (DSS), ie. the sequence of simply 4-connected digital points contained in a standard 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, 4 > | Super |
typedef Super::Point | Point |
typedef Super::Coordinate | Coordinate |
typedef Super::DSL | DSL |
Public Types inherited from DGtal::ArithmeticalDSS< TCoordinate, TCoordinate, 4 > | |
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 | |
StandardDSS4 (const Coordinate &aA, const Coordinate &aB, const Point &aF, const Point &aL, const Point &aUf, const Point &aUl, const Point &aLf, const Point &aLl) | |
StandardDSS4 (const Point &aF, const Point &aL, const bool &isOnTheUpperLine=true) | |
StandardDSS4 (const DSL &aDSL, const Point &aF, const Point &aL) | |
StandardDSS4 (const StandardDSS4 &aDSS, const Point &aF, const Point &aL) | |
template<typename Iterator > | |
StandardDSS4 (const Iterator &aItb, const Iterator &aIte) | |
StandardDSS4 (const StandardDSS4 &aOther) | |
StandardDSS4 & | operator= (const StandardDSS4 &aOther) |
Public Member Functions inherited from DGtal::ArithmeticalDSS< TCoordinate, TCoordinate, 4 > | |
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 Public Attributes inherited from DGtal::ArithmeticalDSS< TCoordinate, TCoordinate, 4 > | |
static const unsigned short | foregroundAdjacency |
Protected Member Functions inherited from DGtal::ArithmeticalDSS< TCoordinate, TCoordinate, 4 > | |
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) |
Protected Attributes inherited from DGtal::ArithmeticalDSS< TCoordinate, TCoordinate, 4 > | |
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 4-connected digital points contained in a standard digital straight line (DSL) between two points of it. This class is an alias of ArithmeticalDSS.
A 4-connected DSS can be declared and constructed as follows:
This requires the following include:
See the documentation of NaiveDSS8 for a longer example and 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 829 of file ArithmeticalDSS.h.
typedef Super::Coordinate DGtal::StandardDSS4< TCoordinate, TInteger >::Coordinate |
Definition at line 835 of file ArithmeticalDSS.h.
typedef Super::DSL DGtal::StandardDSS4< TCoordinate, TInteger >::DSL |
Definition at line 836 of file ArithmeticalDSS.h.
typedef Super::Point DGtal::StandardDSS4< TCoordinate, TInteger >::Point |
Definition at line 834 of file ArithmeticalDSS.h.
typedef ArithmeticalDSS<TCoordinate, TInteger, 4> DGtal::StandardDSS4< TCoordinate, TInteger >::Super |
Definition at line 833 of file ArithmeticalDSS.h.
DGtal::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 | ( | 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::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 | ( | 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::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 | ( | 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::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 | ( | const StandardDSS4< 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::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 | ( | 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::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 | ( | const StandardDSS4< TCoordinate, TInteger > & | aOther | ) |
Copy constructor.
aOther | the object to clone. |
StandardDSS4 & DGtal::StandardDSS4< TCoordinate, TInteger >::operator= | ( | const StandardDSS4< TCoordinate, TInteger > & | aOther | ) |
Assignment.
aOther | the object to copy. |