QWT 7.0.1
Loading...
Searching...
No Matches
qwt_grid_raster_data.h
1#ifndef QWT_GRID_RASTER_DATA_H
2#define QWT_GRID_RASTER_DATA_H
3#include "qwt_global.h"
4#include "qwt_raster_data.h"
5#if QT_VERSION < 0x060000
6template< typename T >
7class QVector;
8#endif
9
20class QWT_EXPORT QwtGridRasterData : public QwtRasterData
21{
22public:
28 {
34
40
45 BicubicInterpolation
46 };
47
48public:
50 virtual ~QwtGridRasterData();
51
52 // Set the resampling algorithm
53 void setResampleMode(ResampleMode mode);
54 ResampleMode resampleMode() const;
55
56 virtual QwtInterval interval(Qt::Axis axis) const QWT_OVERRIDE QWT_FINAL;
57
85 void setValue(const QVector< double >& x, const QVector< double >& y, const QVector< QVector< double > >& v);
86 virtual double value(double x, double y) const QWT_OVERRIDE;
87
88 virtual QRectF pixelHint(const QRectF&) const QWT_OVERRIDE;
89
90 // 获取尺寸
91 int xSize() const;
92 int ySize() const;
93 std::pair< int, int > valueSize() const;
94
95 // 获取value矩阵对应位置的值
96 double atValue(int xIndex, int yIndex) const;
97
98 // 获取x,y在索引位置对应的值
99 double atX(int xIndex) const;
100 double atY(int yIndex) const;
101
102private:
103 class PrivateData;
104 PrivateData* m_data;
105};
106
107#endif // QWTGRIDRASTERDATA_H
Definition qwt_clipper.h:40
A class that encapsulates grid data and provides interpolation methods.
Definition qwt_grid_raster_data.h:21
ResampleMode
Resampling algorithm The default setting is NearestNeighbour;.
Definition qwt_grid_raster_data.h:28
@ BilinearInterpolation
Interpolate the value from the distances and values of the 4 surrounding values in the matrix,...
Definition qwt_grid_raster_data.h:39
@ NearestNeighbour
Return the value from the matrix, that is nearest to the the requested position.
Definition qwt_grid_raster_data.h:33
A class representing an interval.
Definition qwt_interval.h:40
QwtRasterData defines an interface to any type of raster data.
Definition qwt_raster_data.h:60
virtual QRectF pixelHint(const QRectF &) const
Pixel hint.
Definition qwt_raster_data.cpp:284
virtual double value(double x, double y) const =0
virtual QwtInterval interval(Qt::Axis) const =0