266 switch( m_data->resampleMode )
270 const double colF = ( x - xInterval.
minValue() ) / m_data->dx;
271 const double rowF = ( y - yInterval.
minValue() ) / m_data->dy;
273 const int col = qRound( colF );
274 const int row = qRound( rowF );
287 if ( col2 >= m_data->numColumns )
290 if ( col3 >= m_data->numColumns )
304 if ( row2 >= m_data->numRows )
307 if ( row3 >= m_data->numRows )
311 const double v00 = m_data->value( row0, col0 );
312 const double v10 = m_data->value( row0, col1 );
313 const double v20 = m_data->value( row0, col2 );
314 const double v30 = m_data->value( row0, col3 );
317 const double v01 = m_data->value( row1, col0 );
318 const double v11 = m_data->value( row1, col1 );
319 const double v21 = m_data->value( row1, col2 );
320 const double v31 = m_data->value( row1, col3 );
323 const double v02 = m_data->value( row2, col0 );
324 const double v12 = m_data->value( row2, col1 );
325 const double v22 = m_data->value( row2, col2 );
326 const double v32 = m_data->value( row2, col3 );
329 const double v03 = m_data->value( row3, col0 );
330 const double v13 = m_data->value( row3, col1 );
331 const double v23 = m_data->value( row3, col2 );
332 const double v33 = m_data->value( row3, col3 );
334 value = qwtBicubicInterpolate(
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 );
343 int col1 = qRound( ( x - xInterval.
minValue() ) / m_data->dx ) - 1;
344 int row1 = qRound( ( y - yInterval.
minValue() ) / m_data->dy ) - 1;
350 else if ( col2 >= m_data->numColumns )
355 else if ( row2 >= m_data->numRows )
358 const double v11 = m_data->value( row1, col1 );
359 const double v21 = m_data->value( row1, col2 );
360 const double v12 = m_data->value( row2, col1 );
361 const double v22 = m_data->value( row2, col2 );
363 const double x2 = xInterval.
minValue() + ( col2 + 0.5 ) * m_data->dx;
364 const double y2 = yInterval.
minValue() + ( row2 + 0.5 ) * m_data->dy;
366 const double rx = ( x2 - x ) / m_data->dx;
367 const double ry = ( y2 - y ) / m_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;
379 int row = int( ( y - yInterval.
minValue() ) / m_data->dy );
380 int col = int( ( x - xInterval.
minValue() ) / m_data->dx );
387 if ( row >= m_data->numRows )
388 row = m_data->numRows - 1;
390 if ( col >= m_data->numColumns )
391 col = m_data->numColumns - 1;
393 value = m_data->value( row, col );