OpendTect-6_4  6.4
Public Member Functions | Protected Attributes | List of all members
A2DBitMapPosSetup Class Reference

Array2D Bitmap generation setup. More...

Public Member Functions

 A2DBitMapPosSetup (const Array2DInfo &, float *dim0pos=0)
 
virtual ~A2DBitMapPosSetup ()
 
void setDim0Positions (float *dim0positions)
 dim0posistions will become mine More...
 
void setDim1Positions (float, float)
 For dim1. More...
 
const float * dim0Positions () const
 
const Interval< float > & dim1Positions () const
 
int dimSize (int dim) const
 
void setDimRange (int dim, const Interval< float > &r)
 'zooming' More...
 
const Interval< float > & dimRange (int dim) const
 
float dim0MedianDist () const
 
void setBitMapSizes (int, int) const
 
int nrXPix () const
 
int nrYPix () const
 
void setPixSizes (int, int)
 
int availableXPix () const
 
int availableYPix () const
 
float getPixPerDim (int dim) const
 
float getPixOffs (int dim, float pos) const
 
int getPix (int dim, float) const
 
bool isInside (int dim, float) const
 

Protected Attributes

float * dim0pos_
 
Interval< float > dim1pos_
 
int szdim0_
 
int szdim1_
 
Interval< float > dim0rg_
 
Interval< float > dim1rg_
 
float dim0mediandist_
 
int nrxpix_
 
int nrypix_
 
int availablenrxpix_
 
int availablenrypix_
 
float pixperdim0_
 
float pixperdim1_
 

Detailed Description

Array2D Bitmap generation setup.

This class allows 'zooming' into the data, and an irregularly positioned first dimension.

If this class wouldn't exist, both dimensions of the Array2D have to have 100% regular positioning. But if for example the data contains samples of a 2-D seismic line with gaps, this is not the case. That is why you can add positioning in one dimension. The second dimension is assumed to be regular, step 1, starting at 0.

Thus, the first dimension may be irregularly sampled. For the first dimension, you can set up the axis by providing the positions in a float array. If you don't provide that array, one will be generated, the postions are assumed to be: 0 1 2 ..., which is the same as for the second dimension (which can never be irregular, but it can be different from 0 - N-1).

Then, you can zoom in by setting the different ranges. The default ranges will be -0.5 to N-0.5, i.e. half a distance between the cols/rows is added on all sides as border.

The positions in dim 0 must be sorted, ascending. Only the distances may vary. The average distance between the positions is used to calculate the default border.

Dim 0 <-> X ... left-to-right Dim 1 <-> Y ... Top to bottom

This class is not intended to support direct world coordinates and that kind of things. It just enables most simple bitmap generations. You may still need a (usually linear) transformation in both directions for display.

Constructor & Destructor Documentation

A2DBitMapPosSetup::A2DBitMapPosSetup ( const Array2DInfo ,
float *  dim0pos = 0 
)
virtual A2DBitMapPosSetup::~A2DBitMapPosSetup ( )
virtual

Member Function Documentation

int A2DBitMapPosSetup::availableXPix ( ) const
inline
int A2DBitMapPosSetup::availableYPix ( ) const
inline
float A2DBitMapPosSetup::dim0MedianDist ( ) const
inline
const float* A2DBitMapPosSetup::dim0Positions ( ) const
inline
const Interval<float>& A2DBitMapPosSetup::dim1Positions ( ) const
inline
const Interval<float>& A2DBitMapPosSetup::dimRange ( int  dim) const
inline
int A2DBitMapPosSetup::dimSize ( int  dim) const
inline
int A2DBitMapPosSetup::getPix ( int  dim,
float   
) const
float A2DBitMapPosSetup::getPixOffs ( int  dim,
float  pos 
) const
inline
float A2DBitMapPosSetup::getPixPerDim ( int  dim) const
inline
bool A2DBitMapPosSetup::isInside ( int  dim,
float   
) const
int A2DBitMapPosSetup::nrXPix ( ) const
inline
int A2DBitMapPosSetup::nrYPix ( ) const
inline
void A2DBitMapPosSetup::setBitMapSizes ( int  ,
int   
) const
void A2DBitMapPosSetup::setDim0Positions ( float *  dim0positions)

dim0posistions will become mine

void A2DBitMapPosSetup::setDim1Positions ( float  ,
float   
)

For dim1.

void A2DBitMapPosSetup::setDimRange ( int  dim,
const Interval< float > &  r 
)
inline

'zooming'

void A2DBitMapPosSetup::setPixSizes ( int  ,
int   
)

Member Data Documentation

int A2DBitMapPosSetup::availablenrxpix_
protected
int A2DBitMapPosSetup::availablenrypix_
protected
float A2DBitMapPosSetup::dim0mediandist_
protected
float* A2DBitMapPosSetup::dim0pos_
protected
Interval<float> A2DBitMapPosSetup::dim0rg_
protected
Interval<float> A2DBitMapPosSetup::dim1pos_
protected
Interval<float> A2DBitMapPosSetup::dim1rg_
protected
int A2DBitMapPosSetup::nrxpix_
protected
int A2DBitMapPosSetup::nrypix_
protected
float A2DBitMapPosSetup::pixperdim0_
protected
float A2DBitMapPosSetup::pixperdim1_
protected
int A2DBitMapPosSetup::szdim0_
protected
int A2DBitMapPosSetup::szdim1_
protected

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