DGtal  0.9.3beta
Public Types | Static Public Member Functions | Static Private Member Functions
DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency > Class Template Reference

#include <DGtal/geometry/curves/ArithmeticalDSSFactory.h>

Public Types

typedef TCoordinate Coordinate
 
typedef Coordinate Position
 
typedef TInteger Integer
 
typedef DGtal::PointVector< 2, CoordinatePoint
 
typedef Point Vector
 
typedef std::pair< Vector, VectorSteps
 
typedef ArithmeticalDSS< TCoordinate, TInteger, adjacency > DSS
 
typedef ArithmeticalDSL< TCoordinate, TInteger, adjacency > DSL
 

Static Public Member Functions

static DSS createSubsegment (const DSL &aDSL, const Point &aF, const Point &aL)
 
static DSS createSubsegment (const DSS &aDSS, const Point &aF, const Point &aL)
 
static DSS createPattern (const Point &aF, const Point &aL)
 
static DSS createReversedPattern (const Point &aF, const Point &aL)
 
static DSS createDSS (const Coordinate &aA, const Coordinate &aB, const Point &aF, const Point &aL, const Point &aU)
 

Static Private Member Functions

static DSS createLeftSubsegment (const DSS &aDSS, const Point &aL)
 
static Vector bezoutVector (const Coordinate &aA, const Coordinate &aB, const Coordinate &aR)
 

Detailed Description

template<typename TCoordinate, typename TInteger = TCoordinate, unsigned short adjacency = 8>
class DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >

Aim: Set of static methods that create digital straight segments (DSS) from some input parameters, eg. patterns (or reversed patterns) from two upper leaning points (or lower leaning points).

Description of template class 'ArithmeticalDSSFactory'

Template Parameters
TCoordinatea model of integer for the DGtal point coordinate
TIntegera model of integer for the DSS parameters (a, b, mu, omega)
adjacencya integer equal to 8 (default) for naive and 8-connected DSS, and 4 for standard and 4-connected DSS.

Definition at line 73 of file ArithmeticalDSSFactory.h.

Member Typedef Documentation

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef TCoordinate DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::Coordinate

Definition at line 79 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef ArithmeticalDSL<TCoordinate,TInteger,adjacency> DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::DSL

Definition at line 87 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef ArithmeticalDSS<TCoordinate,TInteger,adjacency> DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::DSS

Definition at line 86 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef TInteger DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::Integer

Definition at line 81 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef DGtal::PointVector<2, Coordinate> DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::Point

Definition at line 82 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef Coordinate DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::Position

Definition at line 80 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef std::pair<Vector,Vector> DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::Steps

Definition at line 84 of file ArithmeticalDSSFactory.h.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
typedef Point DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::Vector

Definition at line 83 of file ArithmeticalDSSFactory.h.

Member Function Documentation

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static Vector DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::bezoutVector ( const Coordinate aA,
const Coordinate aB,
const Coordinate aR 
)
staticprivate

Returns the bezout vector (u,v) of a given direction vector of slope aA / aB such that u and aB (resp. v and aA) have the same sign.

Returns
bezout vector
Parameters
aAy-component of the direction vector
aBx-component of the dirention vector
aRa remainder equal to either 1 or -1
See also
createPattern

NB: this method uses the extended Euclid's algorithm and runs in logarithmic time.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static DSS DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::createDSS ( const Coordinate aA,
const Coordinate aB,
const Point aF,
const Point aL,
const Point aU 
)
static

Method that creates a DSS from a direction vector, a first and last point and one upper leaning point.

Parameters
aAy-component of the direction vector
aBx-component of the direction vector
aFfirst input digital point
aLsecond input digital point
aUupper leaning point
Returns
a DSS

NB: logarithmic-time in the max of the greatest component of the vector starting from aU and pointing to aL and the greatest component of the vector starting from aF and pointing to aU.

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static DSS DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::createLeftSubsegment ( const DSS aDSS,
const Point aL 
)
staticprivate

Construction of the left subsegment of minimal parameters of a greater DSS. It is bound by the first point of aDSS on the left and by aL on the right.

Parameters
aDSSbounding DSS
aLlast point of the subsegment

NB: logarithmic-time in the greatest component of the direction vector of the subsegment. Uses reversedSmartCH algorithm [Roussillon 2014 : [61]].

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static DSS DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::createPattern ( const Point aF,
const Point aL 
)
static

Method that creates a DSS that is a pattern or a repetition of a pattern from two input digital points, viewed as upper leaning points.

Parameters
aFfirst input digital point
aLsecond input digital point

NB: logarithmic-time in the greatest component of the vector starting from aF and pointing to aL

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static DSS DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::createReversedPattern ( const Point aF,
const Point aL 
)
static

Method that creates a DSS that is a reversed pattern or a repetition of a reversed pattern from two input digital points, viewed as lower leaning points. Creates the pattern from aL to aF and negates the result.

See also
createPattern
Parameters
aFfirst input digital point
aLsecond input digital point

NB: logarithmic-time in the greatest component of the vector starting from aF and pointing to aL

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static DSS DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::createSubsegment ( const DSL aDSL,
const Point aF,
const Point aL 
)
static

Construction of 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 [Roussillon 2014 : [61]].

template<typename TCoordinate , typename TInteger = TCoordinate, unsigned short adjacency = 8>
static DSS DGtal::ArithmeticalDSSFactory< TCoordinate, TInteger, adjacency >::createSubsegment ( const DSS aDSS,
const Point aF,
const Point aL 
)
static

Construction of 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 [Roussillon 2014 : [61]].

See also
createLeftSubsegment

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