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