QGIS API Documentation  master-3f58142
src/core/raster/qgsrasterresamplefilter.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                          qgsrasterresamplefilter.h
00003                          -------------------
00004     begin                : December 2011
00005     copyright            : (C) 2011 by Marco Hugentobler
00006     email                : marco at sourcepole dot ch
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSRASTERRESAMPLEFILTER_H
00019 #define QGSRASTERRESAMPLEFILTER_H
00020 
00021 #include "qgsrasterdataprovider.h"
00022 #include "qgsrasterinterface.h"
00023 
00024 class QgsRasterResampler;
00025 
00026 class QDomElement;
00027 
00031 class CORE_EXPORT QgsRasterResampleFilter : public QgsRasterInterface
00032 {
00033   public:
00034     QgsRasterResampleFilter( QgsRasterInterface *input = 0 );
00035     ~QgsRasterResampleFilter();
00036 
00037     QgsRasterInterface * clone() const;
00038 
00039     int bandCount() const;
00040 
00041     QGis::DataType dataType( int bandNo ) const;
00042 
00043     bool setInput( QgsRasterInterface* input );
00044 
00045     QgsRasterBlock *block( int bandNo, const QgsRectangle &extent, int width, int height );
00046 
00048     void setZoomedInResampler( QgsRasterResampler* r );
00049     const QgsRasterResampler* zoomedInResampler() const { return mZoomedInResampler; }
00050 
00052     void setZoomedOutResampler( QgsRasterResampler* r );
00053     const QgsRasterResampler* zoomedOutResampler() const { return mZoomedOutResampler; }
00054 
00055     void setMaxOversampling( double os ) { mMaxOversampling = os; }
00056     double maxOversampling() const { return mMaxOversampling; }
00057 
00058     void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
00059 
00061     void readXML( const QDomElement& filterElem );
00062 
00063   protected:
00065     QgsRasterResampler* mZoomedInResampler;
00067     QgsRasterResampler* mZoomedOutResampler;
00068 
00070     double mMaxOversampling;
00071 
00072   private:
00073 };
00074 
00075 #endif // QGSRASTERRESAMPLEFILTER_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines