QGIS API Documentation  2.12.0-Lyon
qgsrasterresamplefilter.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrasterresamplefilter.h
3  -------------------
4  begin : December 2011
5  copyright : (C) 2011 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 QGSRASTERRESAMPLEFILTER_H
19 #define QGSRASTERRESAMPLEFILTER_H
20 
21 #include "qgsrasterdataprovider.h"
22 #include "qgsrasterinterface.h"
23 
24 class QgsRasterResampler;
25 
26 class QDomElement;
27 
31 class CORE_EXPORT QgsRasterResampleFilter : public QgsRasterInterface
32 {
33  public:
36 
37  QgsRasterInterface * clone() const override;
38 
39  int bandCount() const override;
40 
41  QGis::DataType dataType( int bandNo ) const override;
42 
43  bool setInput( QgsRasterInterface* input ) override;
44 
45  QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height ) override;
46 
48  void setZoomedInResampler( QgsRasterResampler* r );
49  const QgsRasterResampler* zoomedInResampler() const { return mZoomedInResampler; }
50 
52  void setZoomedOutResampler( QgsRasterResampler* r );
53  const QgsRasterResampler* zoomedOutResampler() const { return mZoomedOutResampler; }
54 
55  void setMaxOversampling( double os ) { mMaxOversampling = os; }
56  double maxOversampling() const { return mMaxOversampling; }
57 
58  void writeXML( QDomDocument& doc, QDomElement& parentElem ) const override;
59 
61  void readXML( const QDomElement& filterElem ) override;
62 
63  protected:
68 
71 
72  private:
73 };
74 
75 #endif // QGSRASTERRESAMPLEFILTER_H
virtual int bandCount() const =0
Get number of bands.
A rectangle specified with double values.
Definition: qgsrectangle.h:35
Interface for resampling rasters (e.g.
virtual void readXML(const QDomElement &filterElem)
Sets base class members from xml.
Resample filter pipe for rasters.
QgsRasterResampler * mZoomedOutResampler
Resampler used if raster resolution is higher than raster resolution (zoomed out).
Raster data container.
const QgsRasterResampler * zoomedInResampler() const
virtual void writeXML(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
DataType
Raster data types.
Definition: qgis.h:122
virtual QGis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
Base class for processing filters like renderers, reprojector, resampler etc.
double mMaxOversampling
Maximum boundary for oversampling (to avoid too much data traffic).
virtual bool setInput(QgsRasterInterface *input)
Set input.
const QgsRasterResampler * zoomedOutResampler() const
virtual QgsRasterInterface * clone() const =0
Clone itself, create deep copy.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height)=0
Read block of data using given extent and size.
QgsRasterResampler * mZoomedInResampler
Resampler used if screen resolution is higher than raster resolution (zoomed in). ...