18 double A,
double B,
double C,
double D,
double t )
20 const double t2 = t * t;
21 const double t3 = t2 * t;
23 const double a = -A / 2.0 + ( 3.0 * B ) / 2.0 - ( 3.0 * C ) / 2.0 + D / 2.0;
24 const double b = A - ( 5.0 * B ) / 2.0 + 2.0 * C - D / 2.0;
25 const double c = -A / 2.0 + C / 2.0;
28 return a * t3 + b * t2 + c * t +
d;
32 double v00,
double v10,
double v20,
double v30,
33 double v01,
double v11,
double v21,
double v31,
34 double v02,
double v12,
double v22,
double v32,
35 double v03,
double v13,
double v23,
double v33,
36 double dx,
double dy )
55 inline double value(
int row,
int col)
const 123 if ( axis >= 0 && axis <= 2 )
136 if ( axis >= 0 && axis <= 2 )
183 if ( row >= 0 && row < d_data->
numRows &&
273 const int col = qRound( colF );
274 const int row = qRound( rowF );
335 v00, v10, v20, v30, v01, v11, v21, v31,
336 v02, v12, v22, v32, v03, v13, v23, v33,
337 colF - col + 0.5, rowF - row + 0.5 );
366 const double rx = ( x2 - x ) /
d_data->
dx;
367 const double ry = ( y2 - y ) /
d_data->
dy;
369 const double vr1 = rx * v11 + ( 1.0 - rx ) * v21;
370 const double vr2 = rx * v12 + ( 1.0 - rx ) * v22;
372 value = ry * vr1 + ( 1.0 - ry ) * vr2;
virtual QwtInterval interval(Qt::Axis axis) const QWT_OVERRIDE QWT_FINAL
static double qwtBicubicInterpolate(double v00, double v10, double v20, double v30, double v01, double v11, double v21, double v31, double v02, double v12, double v22, double v32, double v03, double v13, double v23, double v33, double dx, double dy)
bool contains(double value) const
A class representing an interval.
void setResampleMode(ResampleMode mode)
Set the resampling algorithm.
void setInterval(Qt::Axis, const QwtInterval &)
Assign the bounding interval for an axis.
ResampleMode
Resampling algorithm The default setting is NearestNeighbour;.
virtual double value(double x, double y) const QWT_OVERRIDE
double value(int row, int col) const
static double qwtHermiteInterpolate(double A, double B, double C, double D, double t)
virtual ~QwtMatrixRasterData()
Destructor.
A class representing a matrix of values as raster data.
virtual QRectF pixelHint(const QRectF &) const QWT_OVERRIDE
Calculate the pixel hint.
void setValue(int row, int col, double value)
Change a single value in the matrix.
const QVector< double > valueMatrix() const
ResampleMode resampleMode() const
void setValueMatrix(const QVector< double > &values, int numColumns)
Assign a value matrix.
double width() const
Return the width of an interval.
QwtMatrixRasterData()
Constructor.
QwtMatrixRasterData::ResampleMode resampleMode