QwtRasterData(3) | Qwt User's Guide | QwtRasterData(3) |
NAME¶
QwtRasterData -QwtRasterData defines an interface to any type of raster data.
SYNOPSIS¶
#include <qwt_raster_data.h>
Inherited by QwtMatrixRasterData.
Public Types¶
enum ConrecFlag { IgnoreAllVerticesOnLevel = 0x01, IgnoreOutOfRange = 0x02 }
Flags to modify the contour algorithm. typedef QMap< double, QPolygonF > ContourLines
Contour lines. typedef QFlags< ConrecFlag > ConrecFlags
Flags to modify the contour algorithm.
Public Member Functions¶
QwtRasterData ()
Constructor. virtual ~QwtRasterData ()
Destructor. virtual void setInterval (Qt::Axis, const QwtInterval &)
const QwtInterval & interval (Qt::Axis) const
virtual QRectF pixelHint (const QRectF &) const
Pixel hint. virtual void initRaster (const QRectF &, const QSize &raster)
Initialize a raster. virtual void discardRaster ()
Discard a raster. virtual double value (double x, double y) const =0
virtual ContourLines contourLines (const QRectF &rect, const QSize &raster, const QList< double > &levels, ConrecFlags) const
Detailed Description¶
QwtRasterData defines an interface to any type of raster data.QwtRasterData is an abstract interface, that is used by QwtPlotRasterItem to find the values at the pixels of its raster.
Often a raster item is used to display values from a matrix. Then the derived raster data class needs to implement some sort of resampling, that maps the raster of the matrix into the requested raster of the raster item ( depending on resolution and scales of the canvas ).
Member Enumeration Documentation¶
enum QwtRasterData::ConrecFlag¶
Flags to modify the contour algorithm.Enumerator
- IgnoreAllVerticesOnLevel
- Ignore all vertices on the same level.
- IgnoreOutOfRange
- Ignore all values, that are out of range.
Member Function Documentation¶
QwtRasterData::ContourLines QwtRasterData::contourLines (const QRectF &rect, const QSize &raster, const QList< double > &levels, ConrecFlagsflags) const [virtual]¶
Calculate contour linesParameters:
raster Number of data pixels of the raster data
levels List of limits, where to insert contour lines
flags Flags to customize the contouring algorithm
Returns:
An adaption of CONREC, a simple contouring algorithm. http://local.wasp.uwa.edu.au/~pbourke/papers/conrec/
void QwtRasterData::discardRaster () [virtual]¶
Discard a raster. After the composition of an image QwtPlotSpectrogram calls discardRaster().The default implementation does nothing, but if data has been loaded in initRaster(), it could deleted now.
See Also:
void QwtRasterData::initRaster (const QRectF &area, const QSize &raster) [virtual]¶
Initialize a raster. Before the composition of an image QwtPlotSpectrogram calls initRaster(), announcing the area and its resolution that will be requested.The default implementation does nothing, but for data sets that are stored in files, it might be good idea to reimplement initRaster(), where the data is resampled and loaded into memory.
Parameters:
raster Number of horizontal and vertical pixels
See Also:
const QwtInterval & QwtRasterData::interval (Qt::Axisaxis) const [inline]¶
Returns:See Also:
QRectF QwtRasterData::pixelHint (const QRectF &area) const [virtual]¶
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.Width and height of the hint need to be the horizontal and vertical distances between 2 neighbored points. The center of the hint has to be the position of any point ( it doesn't matter which one ).
An empty hint indicates, that there are values for any detail level.
Limiting the resolution of the image might significantly improve the performance and heavily reduce the amount of memory when rendering a QImage from the raster data.
The default implementation returns an empty rectangle recommending to render in target device ( f.e. screen ) resolution.
Parameters:
Returns:
Reimplemented in QwtMatrixRasterData.
void QwtRasterData::setInterval (Qt::Axisaxis, const QwtInterval &interval) [virtual]¶
Set the bounding interval for the x, y or z coordinates.Parameters:
interval Bounding interval
See Also:
Reimplemented in QwtMatrixRasterData.
virtual double QwtRasterData::value (doublex, doubley) const [pure virtual]¶
Returns:Parameters:
y Y value in plot coordinates
Implemented in QwtMatrixRasterData.
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.Thu Dec 11 2014 | Version 6.1.2 |