OpendTect  7.0
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Pos::IdxPair2Coord Class Reference

Encapsulates linear transform from (i,j) index to (x,y) coordinates. More...

Classes

struct  DirTransform
 

Public Types

typedef IdxPair::IdxType IdxType
 

Public Member Functions

 IdxPair2Coord ()
 
Coord colDir () const
 
Coord crlDir () const
 
void fillPar (IOPar &) const
 
Coord firstDir () const
 
const DirTransformgetTransform (bool x) const
 
Coord inlDir () const
 
bool isSubsetOf (const IdxPair2Coord &) const
 
bool isValid () const
 
bool operator!= (const IdxPair2Coord &) const
 
bool operator== (const IdxPair2Coord &) const
 
Coord rowDir () const
 
Coord secondDir () const
 
bool set3Pts (const Coord &c0, const Coord &c1, const Coord &c2, const IdxPair &rc0, const IdxPair &rc1, std::int32_t col2)
 
void setTransforms (const DirTransform &x, const DirTransform &y)
 
Coord transform (const Coord &rc) const
 
Coord transform (const IdxPair &) const
 
IdxPair transformBack (const Coord &) const
 
IdxPair transformBack (const Coord &, const IdxPair &start, const IdxPairStep &) const
 
Coord transformBackNoSnap (const Coord &) const
 
void usePar (const IOPar &)
 

Protected Member Functions

bool isNodeOn (const Pos::IdxPair2Coord &, int, int) const
 

Protected Attributes

DirTransform xtr
 
DirTransform ytr
 

Detailed Description

Encapsulates linear transform from (i,j) index to (x,y) coordinates.

<>

Member Typedef Documentation

◆ IdxType

Constructor & Destructor Documentation

◆ IdxPair2Coord()

Pos::IdxPair2Coord::IdxPair2Coord ( )
inline

Member Function Documentation

◆ colDir()

Coord Pos::IdxPair2Coord::colDir ( ) const
inline

◆ crlDir()

Coord Pos::IdxPair2Coord::crlDir ( ) const
inline

◆ fillPar()

void Pos::IdxPair2Coord::fillPar ( IOPar ) const

◆ firstDir()

Coord Pos::IdxPair2Coord::firstDir ( ) const
inline

◆ getTransform()

const DirTransform& Pos::IdxPair2Coord::getTransform ( bool  x) const
inline

◆ inlDir()

Coord Pos::IdxPair2Coord::inlDir ( ) const
inline

◆ isNodeOn()

bool Pos::IdxPair2Coord::isNodeOn ( const Pos::IdxPair2Coord ,
int  ,
int   
) const
protected

◆ isSubsetOf()

bool Pos::IdxPair2Coord::isSubsetOf ( const IdxPair2Coord ) const

◆ isValid()

bool Pos::IdxPair2Coord::isValid ( ) const
inline

◆ operator!=()

bool Pos::IdxPair2Coord::operator!= ( const IdxPair2Coord ) const

◆ operator==()

bool Pos::IdxPair2Coord::operator== ( const IdxPair2Coord ) const

◆ rowDir()

Coord Pos::IdxPair2Coord::rowDir ( ) const
inline

◆ secondDir()

Coord Pos::IdxPair2Coord::secondDir ( ) const
inline

◆ set3Pts()

bool Pos::IdxPair2Coord::set3Pts ( const Coord c0,
const Coord c1,
const Coord c2,
const IdxPair rc0,
const IdxPair rc1,
std::int32_t  col2 
)

Sets up the transform using three points.

Note
that the third point is assumed to be on the same row as the first point.

◆ setTransforms()

void Pos::IdxPair2Coord::setTransforms ( const DirTransform x,
const DirTransform y 
)
inline

◆ transform() [1/2]

Coord Pos::IdxPair2Coord::transform ( const Coord rc) const

transforms a non-integer IdxPair first == X, second == Y.

◆ transform() [2/2]

Coord Pos::IdxPair2Coord::transform ( const IdxPair ) const

◆ transformBack() [1/2]

IdxPair Pos::IdxPair2Coord::transformBack ( const Coord ) const

Transforms Coord to nearest IdxPair.

◆ transformBack() [2/2]

IdxPair Pos::IdxPair2Coord::transformBack ( const Coord ,
const IdxPair start,
const IdxPairStep  
) const

Transforms Coord to IdxPair, with snap.

◆ transformBackNoSnap()

Coord Pos::IdxPair2Coord::transformBackNoSnap ( const Coord ) const

transforms back, but doesn't go to int domain. first == X, second == Y.

◆ usePar()

void Pos::IdxPair2Coord::usePar ( const IOPar )

Member Data Documentation

◆ xtr

DirTransform Pos::IdxPair2Coord::xtr
protected

◆ ytr

DirTransform Pos::IdxPair2Coord::ytr
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024