QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
18 #ifndef QGSBRIGHTNESSCONTRASTFILTER_H
19 #define QGSBRIGHTNESSCONTRASTFILTER_H
21 #include "qgis_core.h"
46 void setBrightness(
int brightness ) { mBrightness = qBound( -255, brightness, 255 ); }
49 void setContrast(
int contrast ) { mContrast = qBound( -100, contrast, 100 ); }
52 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const override;
55 void readXml(
const QDomElement &filterElem )
override;
59 int adjustColorComponent(
int colorComponent,
int alpha,
int brightness,
double contrastFactor )
const;
68 #endif // QGSBRIGHTNESSCONTRASTFILTER_H
DataType
Raster data types.
virtual void writeXml(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
virtual bool setInput(QgsRasterInterface *input)
Set input.
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.
void setContrast(int contrast)
void setBrightness(int brightness)
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.