QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSBRIGHTNESSCONTRASTFILTER_H
19 #define QGSBRIGHTNESSCONTRASTFILTER_H
21 #include "qgis_core.h"
67 void setBrightness(
int brightness ) { mBrightness = qBound( -255, brightness, 255 ); }
79 void setContrast(
int contrast ) { mContrast = qBound( -100, contrast, 100 ); }
93 void setGamma(
double gamma ) { mGamma = qBound( 0.1, gamma, 10.0 ); }
101 double gamma()
const {
return mGamma; }
104 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
107 void readXml(
const QDomElement &filterElem )
override;
111 int adjustColorComponent(
int colorComponent,
int alpha,
int brightness,
double contrastFactor,
double gammaCorrection )
const;
124 #endif // QGSBRIGHTNESSCONTRASTFILTER_H
DataType
Raster data types.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
A rectangle specified with double values.
virtual bool setInput(QgsRasterInterface *input)
Set input.
int brightness() const
Returns current brightness level.
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
virtual void readXml(const QDomElement &filterElem)
Sets base class members from xml. Usually called from create() methods of subclasses.
int contrast() const
Returns current contrast level.
Base class for processing filters like renderers, reprojector, resampler etc.
Brightness/contrast and gamma correction filter pipe for rasters.
Feedback object tailored for raster block reading.
void setContrast(int contrast)
Set contrast level.
void setBrightness(int brightness)
Set brightness level.
virtual int bandCount() const =0
Gets number of bands.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)=0
Read block of data using given extent and size.
void setGamma(double gamma)
Set gamma value.
double gamma() const
Returns current gamma value.