QwtMatrixRasterData(3)
πΈ NAME πΈ
Bestie, welcome to QwtMatrixRasterData(3) from the Library Functions Manual π β this whole page is about the class QwtMatrixRasterData, which is a class representing a matrix of values as raster data. Slay.
β¨ SYNOPSIS β¨
#include <qwt_matrix_raster_data.h>
Inherits QwtRasterData.
π Public Types
enum ResampleMode { NearestNeighbour, BilinearInterpolation, BicubicInterpolation }β Resampling algorithm. The default setting isNearestNeighbour;.
π Public Types inherited from QwtRasterData
enum Attribute { WithoutGaps = 0x01 }β Raster data attributes.enum ConrecFlag { IgnoreAllVerticesOnLevel = 0x01, IgnoreOutOfRange = 0x02 }β Flags to modify the contour algorithm.typedef QMap< double, QPolygonF > ContourLinesβ Contour lines.typedef QFlags< Attribute > Attributestypedef QFlags< ConrecFlag > ConrecFlags
π¦ Public Member Functions
QwtMatrixRasterData ()β Constructor.virtual ~QwtMatrixRasterData ()β Destructor.void setResampleMode (ResampleMode mode)β Set the resampling algorithm.ResampleMode resampleMode () constvoid setInterval (Qt::Axis, const QwtInterval &)β Assign the bounding interval for an axis.virtual QwtInterval interval (Qt::Axis axis) const override finalvoid setValueMatrix (const QVector< double > &values, int numColumns)β Assign a value matrix.const QVector< double > valueMatrix () constvoid setValue (int row, int col, double value)β Change a single value in the matrix.int numColumns () constint numRows () constvirtual QRectF pixelHint (const QRectF &) const overrideβ Calculate the pixel hint.virtual double value (double x, double y) const override
π Public Member Functions inherited from QwtRasterData
QwtRasterData ()β Constructor.virtual ~QwtRasterData ()β Destructor.void setAttribute (Attribute, bool on=true)bool testAttribute (Attribute) constvirtual void initRaster (const QRectF &, const QSize &raster)β Initialize a raster.virtual void discardRaster ()β Discard a raster.virtual ContourLines contourLines (const QRectF &rect, const QSize &raster, const QList< double > &levels, ConrecFlags) const
π Detailed Description π
A class representing a matrix of values as raster data.
QwtMatrixRasterData implements an interface for a matrix of equidistant values, that can be used by a QwtPlotRasterItem. It implements a couple of resampling algorithms, to provide values for positions that aren't on the value matrix. Main character energy for a raster class, honestly.
Definition at line 28 of file qwt_matrix_raster_data.h.
π₯ Member Enumeration Documentation π₯
enum QwtMatrixRasterData::ResampleMode
Resampling algorithm. The default setting is NearestNeighbour;.
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
Definition at line 35 of file qwt_matrix_raster_data.h.
π§ Constructor & Destructor Documentation π§
QwtMatrixRasterData::QwtMatrixRasterData ()
Constructor.
Definition at line 72 of file qwt_matrix_raster_data.cpp.
QwtMatrixRasterData::~QwtMatrixRasterData () [virtual]
Destructor.
Definition at line 79 of file qwt_matrix_raster_data.cpp.
π Member Function Documentation π
QwtInterval QwtMatrixRasterData::interval (Qt::Axis axis) const [final], [override], [virtual]
Returns: Bounding interval for an axis
See also: setInterval
Implements QwtRasterData.
Definition at line 134 of file qwt_matrix_raster_data.cpp.
int QwtMatrixRasterData::numColumns () const
Returns: Number of columns of the value matrix
See also: valueMatrix(), numRows(), setValueMatrix()
Definition at line 195 of file qwt_matrix_raster_data.cpp.
int QwtMatrixRasterData::numRows () const
Returns: Number of rows of the value matrix
See also: valueMatrix(), numColumns(), setValueMatrix()
Definition at line 204 of file qwt_matrix_raster_data.cpp.
QRectF QwtMatrixRasterData::pixelHint (const QRectF & area) const [override], [virtual]
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, that is representing the data.
NearestNeighbourβpixelHint()returns the surrounding pixel of the top left value in the matrix.BilinearInterpolationβ Returns an empty rectangle recommending to render in target device ( f.e. screen ) resolution.
Parameters:
areaβ Requested area, ignored
Returns: Calculated hint
See also: ResampleMode, setMatrix(), setInterval()
Reimplemented from QwtRasterData.
Definition at line 229 of file qwt_matrix_raster_data.cpp.
QwtMatrixRasterData::ResampleMode QwtMatrixRasterData::resampleMode () const
Returns: resampling algorithm
See also: setResampleMode(), value()
Definition at line 99 of file qwt_matrix_raster_data.cpp.
void QwtMatrixRasterData::setInterval (Qt::Axis axis, const QwtInterval & interval)
Assign the bounding interval for an axis. Setting the bounding intervals for the X/Y axis is mandatory to define the positions for the values of the value matrix. The interval in Z direction defines the possible range for the values in the matrix, what is f.e used by QwtPlotSpectrogram to map values to colors. The Z-interval might be the bounding interval of the values in the matrix, but usually it isn't. ( f.e a interval of 0.0-100.0 for values in percentage )
π¨ Mandatory bestie alert: setting the bounding intervals for the X/Y axis is mandatory to define the positions for the values of the value matrix. No cap.
Parameters:
axisβ X, Y or Z axisintervalβ Interval
See also: QwtRasterData::interval(), setValueMatrix()
Definition at line 120 of file qwt_matrix_raster_data.cpp.
void QwtMatrixRasterData::setResampleMode (ResampleMode mode)
Set the resampling algorithm.
Parameters:
modeβ Resampling mode
See also: resampleMode(), value()
Definition at line 90 of file qwt_matrix_raster_data.cpp.
void QwtMatrixRasterData::setValue (int row, int col, double value)
Change a single value in the matrix.
Parameters:
rowβ Row indexcolβ Column indexvalueβ New value
See also: value(), setValueMatrix()
Definition at line 181 of file qwt_matrix_raster_data.cpp.
void QwtMatrixRasterData::setValueMatrix (const QVector< double > & values, int numColumns)
Assign a value matrix. The positions of the values are calculated by dividing the bounding rectangle of the X/Y intervals into equidistant rectangles ( pixels ). Each value corresponds to the center of a pixel.
Parameters:
valuesβ Vector of valuesnumColumnsβ Number of columns
See also: valueMatrix(), numColumns(), numRows(), setInterval()()
Definition at line 155 of file qwt_matrix_raster_data.cpp.
double QwtMatrixRasterData::value (double x, double y) const [override], [virtual]
Returns: the value at a raster position
Parameters:
xβ X value in plot coordinatesyβ Y value in plot coordinates
See also: ResampleMode
Implements QwtRasterData.
Definition at line 256 of file qwt_matrix_raster_data.cpp.
const QVector< double > QwtMatrixRasterData::valueMatrix () const
Returns: Value matrix
See also: setValueMatrix(), numColumns(), numRows(), setInterval()
Definition at line 167 of file qwt_matrix_raster_data.cpp.
π Author π
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Okay that's the whole page, bestie β the source/version vibe is Qwt User's Guide, the footer tag is QwtMatrixRasterData(3), and there's no date printed, so that's the cute sign-off. Mwah ππ¦β¨
π¦ where this page comes from
- alpine 3.24: qwt-doc 6.3.0-r0 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms