QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
QwtGridRasterData Class Reference

A class that encapsulates grid data and provides interpolation methods. More...

#include <qwt_grid_raster_data.h>

Inheritance diagram for QwtGridRasterData:
QwtRasterData

Classes

class  PrivateData
 

Public Types

enum  ResampleMode { NearestNeighbour , BilinearInterpolation , BicubicInterpolation }
 Resampling algorithm. More...
 
- Public Types inherited from QwtRasterData
enum  Attribute { WithoutGaps = 0x01 }
 Raster data attributes. More...
 
enum  ConrecFlag { IgnoreAllVerticesOnLevel = 0x01 , IgnoreOutOfRange = 0x02 }
 Flags to modify the contour algorithm . More...
 
using ContourLines = QMap< double, QPolygonF >
 Contour lines.
 

Public Member Functions

 QwtGridRasterData ()
 Constructor. .
 
virtual ~QwtGridRasterData ()
 Destructor .
 
void setResampleMode (ResampleMode mode)
 Set the resample method.
 
ResampleMode resampleMode () const
 Get the current resample method.
 
virtual QwtInterval interval (Qt::Axis axis) const override final
 Return bounding interval for an axis.
 
void setValue (const QVector< double > &x, const QVector< double > &y, const QVector< QVector< double > > &v)
 Set new x-axis, y-axis, and data matrix.
 
virtual double value (double x, double y) const override
 Return the value at a raster position.
 
virtual QRectF pixelHint (const QRectF &) const override
 Calculate the pixel hint.
 
int xSize () const
 Return the size of x-axis.
 
int ySize () const
 Return the size of y-axis.
 
std::pair< int, int > valueSize () const
 Return the size of the value matrix.
 
double atValue (int xIndex, int yIndex) const
 Return the value at specified position in the value matrix.
 
double atX (int xIndex) const
 Return the x-axis value at specified index.
 
double atY (int yIndex) const
 Return the y-axis value at specified index.
 
- Public Member Functions inherited from QwtRasterData
 QwtRasterData ()
 Constructor.
 
virtual ~QwtRasterData ()
 Destructor.
 
void setAttribute (Attribute, bool on=true)
 Set an attribute.
 
bool testAttribute (Attribute) const
 Test an attribute.
 
virtual void initRaster (const QRectF &, const QSize &raster)
 Initialize the raster.
 
virtual void discardRaster ()
 Discard the raster.
 
virtual ContourLines contourLines (const QRectF &rect, const QSize &raster, const QList< double > &levels, ConrecFlags) const
 Calculate contour lines.
 

Detailed Description

A class that encapsulates grid data and provides interpolation methods.

Member Enumeration Documentation

◆ ResampleMode

Resampling algorithm.

Enumerator
NearestNeighbour 

Return the value from the matrix that is nearest to the requested position.

BilinearInterpolation 

Interpolate the value from the distances and values of the 4 surrounding values in the matrix.

BicubicInterpolation 

Interpolate the value from the 16 surrounding values in the matrix using hermite bicubic interpolation.

Constructor & Destructor Documentation

◆ QwtGridRasterData()

QwtGridRasterData::QwtGridRasterData ( )

Constructor. .

◆ ~QwtGridRasterData()

QwtGridRasterData::~QwtGridRasterData ( )
virtual

Destructor .

Member Function Documentation

◆ atValue()

double QwtGridRasterData::atValue ( int  xIndex,
int  yIndex 
) const

Return the value at specified position in the value matrix.

◆ atX()

double QwtGridRasterData::atX ( int  xIndex) const

Return the x-axis value at specified index.

◆ atY()

double QwtGridRasterData::atY ( int  yIndex) const

Return the y-axis value at specified index.

◆ interval()

QwtInterval QwtGridRasterData::interval ( Qt::Axis  axis) const
finaloverridevirtual

Return bounding interval for an axis.

Implements QwtRasterData.

◆ pixelHint()

QRectF QwtGridRasterData::pixelHint ( const QRectF &  area) const
overridevirtual

Calculate the pixel hint.

Reimplemented from QwtRasterData.

◆ resampleMode()

QwtGridRasterData::ResampleMode QwtGridRasterData::resampleMode ( ) const

Get the current resample method.

◆ setResampleMode()

void QwtGridRasterData::setResampleMode ( QwtGridRasterData::ResampleMode  mode)

Set the resample method.

◆ setValue()

void QwtGridRasterData::setValue ( const QVector< double > &  x,
const QVector< double > &  y,
const QVector< QVector< double > > &  v 
)

Set new x-axis, y-axis, and data matrix.

◆ value()

double QwtGridRasterData::value ( double  x,
double  y 
) const
overridevirtual

Return the value at a raster position.

Implements QwtRasterData.

◆ valueSize()

std::pair< int, int > QwtGridRasterData::valueSize ( ) const

Return the size of the value matrix.

◆ xSize()

int QwtGridRasterData::xSize ( ) const

Return the size of x-axis.

◆ ySize()

int QwtGridRasterData::ySize ( ) const

Return the size of y-axis.


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