DGtal  1.5.beta
DGtal::StandardDSS4< TCoordinate, TInteger > Class Template Reference

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>

Inheritance diagram for DGtal::StandardDSS4< TCoordinate, TInteger >:
[legend]

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)
 
StandardDSS4operator= (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)
 
ArithmeticalDSSoperator= (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 DSLdsl () 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
 

Detailed Description

template<typename TCoordinate, typename TInteger = TCoordinate>
class DGtal::StandardDSS4< TCoordinate, TInteger >

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:

// Construct a standard DSS
StandardDSS4<Integer> segment( 5, 8, //slope
Point(0,0), Point(8,5), //ending points
Point(0,0), Point(8,5), //upper points
Point(4,1), Point(4,1) //lower points
);

This requires the following include:

#include "DGtal/geometry/curves/ArithmeticalDSS.h"

See the documentation of NaiveDSS8 for a longer example and see Digital straight lines and segments
for further details.

Template Parameters
TCoordinatea model of integer for the DGtal point coordinates and the slope parameters.
TIntegera 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.

See also
ArithmeticalDSL NaiveDSL StandardDSL
exampleArithmeticalDSL.cpp exampleArithmeticalDSS.cpp

Definition at line 829 of file ArithmeticalDSS.h.

Member Typedef Documentation

◆ Coordinate

template<typename TCoordinate , typename TInteger = TCoordinate>
typedef Super::Coordinate DGtal::StandardDSS4< TCoordinate, TInteger >::Coordinate

Definition at line 835 of file ArithmeticalDSS.h.

◆ DSL

template<typename TCoordinate , typename TInteger = TCoordinate>
typedef Super::DSL DGtal::StandardDSS4< TCoordinate, TInteger >::DSL

Definition at line 836 of file ArithmeticalDSS.h.

◆ Point

template<typename TCoordinate , typename TInteger = TCoordinate>
typedef Super::Point DGtal::StandardDSS4< TCoordinate, TInteger >::Point

Definition at line 834 of file ArithmeticalDSS.h.

◆ Super

template<typename TCoordinate , typename TInteger = TCoordinate>
typedef ArithmeticalDSS<TCoordinate, TInteger, 4> DGtal::StandardDSS4< TCoordinate, TInteger >::Super

Definition at line 833 of file ArithmeticalDSS.h.

Constructor & Destructor Documentation

◆ StandardDSS4() [1/6]

template<typename TCoordinate , typename TInteger = TCoordinate>
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.

Parameters
aAy-component of the direction vector
aBx-component of the direction vector
aFthe first point
aLthe last point
aUfthe first upper point
aUlthe last upper point
aLfthe first lower point
aLlthe last lower point

◆ StandardDSS4() [2/6]

template<typename TCoordinate , typename TInteger = TCoordinate>
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.

Parameters
aFthe first point
aLthe last point
isOnTheUpperLineboolean 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

◆ StandardDSS4() [3/6]

template<typename TCoordinate , typename TInteger = TCoordinate>
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.

Parameters
aDSLbounding DSL
aFfirst point of the subsegment
aLlast point of the subsegment

NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses smartCH algorithm.

◆ StandardDSS4() [4/6]

template<typename TCoordinate , typename TInteger = TCoordinate>
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.

Parameters
aDSSbounding DSS
aFfirst point of the subsegment
aLlast point of the subsegment

NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses reversedSmartCH algorithm.

See also
ArithmeticalDSSFactory

◆ StandardDSS4() [5/6]

template<typename TCoordinate , typename TInteger = TCoordinate>
template<typename Iterator >
DGtal::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 ( const Iterator &  aItb,
const Iterator &  aIte 
)

Construction from a range of iterators on points.

Parameters
aItbbegin iterator
aIteend iterator
Template Parameters
Iteratora model of forward iterator

NB: linear-time in the size of the range

◆ StandardDSS4() [6/6]

template<typename TCoordinate , typename TInteger = TCoordinate>
DGtal::StandardDSS4< TCoordinate, TInteger >::StandardDSS4 ( const StandardDSS4< TCoordinate, TInteger > &  aOther)

Copy constructor.

Parameters
aOtherthe object to clone.

Member Function Documentation

◆ operator=()

template<typename TCoordinate , typename TInteger = TCoordinate>
StandardDSS4& DGtal::StandardDSS4< TCoordinate, TInteger >::operator= ( const StandardDSS4< TCoordinate, TInteger > &  aOther)

Assignment.

Parameters
aOtherthe object to copy.
Returns
a reference on 'this'.

The documentation for this class was generated from the following file: