Classes | Public Member Functions | Protected Attributes

RCol2Coord Class Reference

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

List of all members.

Classes

struct  RCTransform

Public Member Functions

 RCol2Coord ()
bool isValid () const
Coord rowDir () const
Coord colDir () const
Coord transform (const RowCol &) const
Coord transform (const BinID &) const
Coord transform (const Coord &rc) const
BinID transformBack (const Coord &, const StepInterval< int > *inlrg=0, const StepInterval< int > *crlrg=0) const
Coord transformBackNoSnap (const Coord &) const
bool set3Pts (const Coord &c0, const Coord &c1, const Coord &c2, const RowCol &rc0, const RowCol &rc1, int col2)
bool set3Pts (const Coord &c0, const Coord &c1, const Coord &c2, const BinID &bid0, const BinID &bid1, int crl2)
void setTransforms (const RCTransform &x, const RCTransform &y)
const RCTransformgetTransform (bool x) const

Protected Attributes

RCTransform xtr
RCTransform ytr

Detailed Description

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


Constructor & Destructor Documentation

RCol2Coord::RCol2Coord (  )  [inline]

Member Function Documentation

Coord RCol2Coord::colDir (  )  const [inline]
const RCTransform& RCol2Coord::getTransform ( bool  x  )  const [inline]
bool RCol2Coord::isValid (  )  const [inline]
Coord RCol2Coord::rowDir (  )  const [inline]
bool RCol2Coord::set3Pts ( const Coord c0,
const Coord c1,
const Coord c2,
const RowCol rc0,
const RowCol rc1,
int  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.
bool RCol2Coord::set3Pts ( const Coord c0,
const Coord c1,
const Coord c2,
const BinID bid0,
const BinID bid1,
int  crl2 
)

Sets up the transform using three points.

Note:
that the third point is assumed to be on the same row as the first point.
void RCol2Coord::setTransforms ( const RCTransform x,
const RCTransform y 
) [inline]
Coord RCol2Coord::transform ( const BinID  )  const
Coord RCol2Coord::transform ( const RowCol  )  const
Coord RCol2Coord::transform ( const Coord rc  )  const

transforms a rowcol stored in a coord. The row is stored in the x-component, and the col is stored in the y-component.

BinID RCol2Coord::transformBack ( const Coord ,
const StepInterval< int > *  inlrg = 0,
const StepInterval< int > *  crlrg = 0 
) const

Transforms Coord to RowCol. If the ranges are given, they are only used for snapping: the actual range is not used

Coord RCol2Coord::transformBackNoSnap ( const Coord  )  const

transforms back, but does not snap. The row is stored in the x-component, and the col is stored in the y-component.


Member Data Documentation