QXRD  0.11.16
Public Member Functions | Private Attributes | List of all members
QxrdMaskRasterData Class Reference

#include <qxrdmaskrasterdata.h>

Inheritance diagram for QxrdMaskRasterData:
Inheritance graph
[legend]
Collaboration diagram for QxrdMaskRasterData:
Collaboration graph
[legend]

Public Member Functions

 QxrdMaskRasterData (QcepMaskDataPtr mask=QcepMaskDataPtr(), int interp=0)
 
double value (double x, double y) const
 
QwtInterval range () const
 
short int * data () const
 
const QcepMaskDataPtr mask () const
 
int interp () const
 

Private Attributes

QcepMaskDataPtr m_Mask
 
int m_Interpolate
 

Detailed Description

Definition at line 9 of file qxrdmaskrasterdata.h.

Constructor & Destructor Documentation

QxrdMaskRasterData::QxrdMaskRasterData ( QcepMaskDataPtr  mask = QcepMaskDataPtr(),
int  interp = 0 
)

Definition at line 7 of file qxrdmaskrasterdata.cpp.

References DEBUG_IMAGES, g_Application, HEXARG, QcepApplication::printMessage(), qcepDebug(), and range().

8  : QwtRasterData(),
9  m_Mask(mask),
11 {
13  g_Application->printMessage(QObject::tr("QxrdMaskRasterData::QxrdMaskRasterData(%1,%2) [%3]")
14  .HEXARG(mask.data()).arg(interp).HEXARG(this));
15  }
16 
17  setInterval(Qt::XAxis, QwtInterval(0, (mask?mask->get_Width():0)));
18  setInterval(Qt::YAxis, QwtInterval(0, (mask?mask->get_Height():0)));
19  setInterval(Qt::ZAxis, range());
20 }
qint64 qcepDebug(int cond)
Definition: qcepdebug.cpp:26
QcepMaskDataPtr m_Mask
const QcepMaskDataPtr mask() const
#define HEXARG(a)
Definition: qcepdebug.h:50
virtual void printMessage(QString msg, QDateTime ts=QDateTime::currentDateTime())=0
QcepApplication * g_Application
QwtInterval range() const

Here is the call graph for this function:

Member Function Documentation

short int * QxrdMaskRasterData::data ( ) const

Definition at line 48 of file qxrdmaskrasterdata.cpp.

References m_Mask.

Referenced by QxrdImagePlot::trackerTextF().

49 {
50  if (m_Mask) {
51  return m_Mask->data();
52  } else {
53  return NULL;
54  }
55 }
QcepMaskDataPtr m_Mask

Here is the caller graph for this function:

int QxrdMaskRasterData::interp ( ) const
inline

Definition at line 21 of file qxrdmaskrasterdata.h.

References m_Interpolate.

21 { return m_Interpolate; }
const QcepMaskDataPtr QxrdMaskRasterData::mask ( ) const
inline

Definition at line 20 of file qxrdmaskrasterdata.h.

References m_Mask.

20 { return m_Mask; }
QcepMaskDataPtr m_Mask
QwtInterval QxrdMaskRasterData::range ( ) const

Definition at line 57 of file qxrdmaskrasterdata.cpp.

Referenced by QxrdMaskRasterData().

58 {
59  return QwtInterval(0.0, 3.0);
60 }

Here is the caller graph for this function:

double QxrdMaskRasterData::value ( double  x,
double  y 
) const

Definition at line 22 of file qxrdmaskrasterdata.cpp.

References m_Interpolate, and m_Mask.

Referenced by QxrdImagePlot::trackerTextF().

23 {
24  if (m_Mask) {
25  if (m_Interpolate) {
26  int ix = (int) x, iy = (int) y;
27  double dx = x-ix, dy = y-iy;
28 
29  double f00 = m_Mask->maskValue(ix,iy);
30  double f10 = m_Mask->maskValue(ix+1,iy);
31  double f01 = m_Mask->maskValue(ix,iy+1);
32  double f11 = m_Mask->maskValue(ix+1,iy+1);
33 
34  double f0 = f00*(1-dx)+f10*dx;
35  double f1 = f01*(1-dx)+f11*dx;
36 
37  double f = f0*(1-dy)+f1*dy;
38 
39  return f;
40  } else {
41  return m_Mask->maskValue(((int) qRound(x)), ((int) qRound(y)));
42  }
43  } else {
44  return 1;
45  }
46 }
QcepMaskDataPtr m_Mask

Here is the caller graph for this function:

Member Data Documentation

int QxrdMaskRasterData::m_Interpolate
private

Definition at line 25 of file qxrdmaskrasterdata.h.

Referenced by interp(), and value().

QcepMaskDataPtr QxrdMaskRasterData::m_Mask
private

Definition at line 24 of file qxrdmaskrasterdata.h.

Referenced by data(), mask(), and value().


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