QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgssinglebandcolordatarenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssinglebandcolordatarenderer.h
3  --------------------------------
4  begin : January 2012
5  copyright : (C) 2012 by Marco Hugentobler
6  email : marco at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSSINGLEBANDCOLORDATARENDERER_H
19 #define QGSSINGLEBANDCOLORDATARENDERER_H
20 
21 #include "qgsrasterrenderer.h"
22 
23 class QDomElement;
24 
29 {
30  public:
33  QgsSingleBandColorDataRenderer * clone() const override;
34 
35  static QgsRasterRenderer* create( const QDomElement& elem, QgsRasterInterface* input );
36 
37  bool setInput( QgsRasterInterface* input ) override;
38 
39  QgsRasterBlock* block( int bandNo, const QgsRectangle & extent, int width, int height ) override;
40  QgsRasterBlock* block2( int bandNo, const QgsRectangle & extent, int width, int height, QgsRasterBlockFeedback* feedback = nullptr ) override;
41 
42  void writeXML( QDomDocument& doc, QDomElement& parentElem ) const override;
43 
44  QList<int> usesBands() const override;
45 
46  private:
47  int mBand;
48 
51 };
52 
53 #endif // QGSSINGLEBANDCOLORDATARENDERER_H
A rectangle specified with double values.
Definition: qgsrectangle.h:35
virtual QList< int > usesBands() const
Returns a list of band numbers used by the renderer.
virtual QgsRasterBlock * block2(int bandNo, const QgsRectangle &extent, int width, int height, QgsRasterBlockFeedback *feedback=nullptr)
Read block of data using given extent and size.
Raster renderer pipe for single band color.
virtual bool setInput(QgsRasterInterface *input) override
Set input.
Raster data container.
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 QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height)=0
Read block of data using given extent and size.
QgsRasterRenderer * clone() const override=0
Clone itself, create deep copy.
Feedback object tailored for raster block reading.
Raster renderer pipe that applies colors to a raster.