QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | 所有成员列表
QwtGridRasterData类 参考

A class that encapsulates grid data and provides interpolation methods. 更多...

#include <qwt_grid_raster_data.h>

类 QwtGridRasterData 继承关系图:
QwtRasterData

class  PrivateData
 

Public 类型

enum  ResampleMode { NearestNeighbour , BilinearInterpolation , BicubicInterpolation }
 Resampling algorithm 更多...
 
- Public 类型 继承自 QwtRasterData
enum  Attribute { WithoutGaps = 0x01 }
 Raster data attributes 更多...
 
enum  ConrecFlag { IgnoreAllVerticesOnLevel = 0x01 , IgnoreOutOfRange = 0x02 }
 Flags to modify the contour algorithm 更多...
 
using ContourLines = QMap< double, QPolygonF >
 Contour lines
 

Public 成员函数

 QwtGridRasterData ()
 Constructor.
 
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 成员函数 继承自 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
 

详细描述

A class that encapsulates grid data and provides interpolation methods.

This class inherits from QwtRasterData and is used to represent 2D grid data. It supports various interpolation methods such as nearest neighbor and bilinear interpolation.

成员枚举类型说明

◆ ResampleMode

Resampling algorithm

The default setting is NearestNeighbour.

枚举值
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.

构造及析构函数说明

◆ QwtGridRasterData()

QwtGridRasterData::QwtGridRasterData ( )

Constructor.

Destructor

成员函数说明

◆ atValue()

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

Return the value at specified position in the value matrix.

参数
[in]xIndexX index.
[in]yIndexY index.
返回
Value at the position.

◆ atX()

double QwtGridRasterData::atX ( int  xIndex) const

Return the x-axis value at specified index.

参数
[in]xIndexX index.
返回
X-axis value.

◆ atY()

double QwtGridRasterData::atY ( int  yIndex) const

Return the y-axis value at specified index.

参数
[in]yIndexY index.
返回
Y-axis value.

◆ interval()

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

Return bounding interval for an axis

参数
[in]axisAxis to query (X, Y, or Z)
返回
Bounding interval for the axis

实现了 QwtRasterData.

◆ pixelHint()

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

Calculate the pixel hint

pixelHint() returns the geometry of a pixel that can be used to calculate the resolution and alignment of the plot item representing the data. For NearestNeighbour mode, returns the surrounding pixel. For other modes, returns an empty rectangle.

参数
[in]areaRequested area (ignored)
返回
Calculated hint rectangle

重载 QwtRasterData .

◆ resampleMode()

QwtGridRasterData::ResampleMode QwtGridRasterData::resampleMode ( ) const

Get the current resample method.

返回
The current resample method.
参见
setResampleMode(), value()

◆ setResampleMode()

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

Set the resample method.

Sets the resample method to be used when querying values.

参数
[in]modeThe resample method to use.
参见
resampleMode(), value()

◆ 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

The data matrix layout:

  • data matrix.size = xAxis.size
  • data matrix.at(n).size = yAxis.size
    参数
    [in]xThe x-axis values
    [in]yThe y-axis values
    [in]vThe 2D data matrix

◆ value()

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

Return the value at a raster position

参数
[in]xX value in plot coordinates
[in]yY value in plot coordinates
返回
Value at the position, or NaN if outside bounds

实现了 QwtRasterData.

◆ valueSize()

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

Return the size of the value matrix.

返回
Pair of (xSize, ySize).

◆ xSize()

int QwtGridRasterData::xSize ( ) const

Return the size of x-axis.

返回
Size of x-axis.

◆ ySize()

int QwtGridRasterData::ySize ( ) const

Return the size of y-axis.

返回
Size of y-axis.

该类的文档由以下文件生成: