QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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;
38 
39  int bandCount() const;
40 
41  QGis::DataType dataType( int bandNo ) const;
42 
43  bool setInput( QgsRasterInterface* input );
44 
45  QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height );
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;
59 
61  void readXML( const QDomElement& filterElem );
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
double maxOversampling() const
Definition: qgsrasterresamplefilter.h:56
void setMaxOversampling(double os)
Definition: qgsrasterresamplefilter.h:55
Interface for resampling rasters (e.g.
Definition: qgsrasterresampler.h:28
virtual void readXML(const QDomElement &filterElem)
Sets base class members from xml.
Definition: qgsrasterinterface.h:213
Resample filter pipe for rasters.
Definition: qgsrasterresamplefilter.h:31
QgsRasterResampler * mZoomedOutResampler
Resampler used if raster resolution is higher than raster resolution (zoomed out).
Definition: qgsrasterresamplefilter.h:67
Raster data container.
Definition: qgsrasterblock.h:32
const QgsRasterResampler * zoomedInResampler() const
Definition: qgsrasterresamplefilter.h:49
virtual void writeXML(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
Definition: qgsrasterinterface.h:211
DataType
Raster data types.
Definition: qgis.h:204
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.
Definition: qgsrasterinterface.h:35
double mMaxOversampling
Maximum boundary for oversampling (to avoid too much data traffic).
Definition: qgsrasterresamplefilter.h:70
virtual bool setInput(QgsRasterInterface *input)
Set input.
Definition: qgsrasterinterface.h:117
const QgsRasterResampler * zoomedOutResampler() const
Definition: qgsrasterresamplefilter.h:53
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). ...
Definition: qgsrasterresamplefilter.h:65