18 #ifndef QGSBRIGHTNESSCONTRASTFILTER_H
19 #define QGSBRIGHTNESSCONTRASTFILTER_H
21 #include "qgis_core.h"
67 void setBrightness(
int brightness );
79 void setContrast(
int contrast );
93 void setGamma(
double gamma );
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;
DataType
Raster data types.
Brightness/contrast and gamma correction filter pipe for rasters.
int contrast() const
Returns current contrast level.
int brightness() const
Returns current brightness level.
double gamma() const
Returns current gamma value.
Feedback object tailored for raster block reading.
Base class for processing filters like renderers, reprojector, resampler etc.
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.
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
virtual Qgis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
virtual int bandCount() const =0
Gets number of bands.
virtual void readXml(const QDomElement &filterElem)
Sets base class members from xml. Usually called from create() methods of subclasses.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
virtual bool setInput(QgsRasterInterface *input)
Set input.
A rectangle specified with double values.