00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QGSNINECELLFILTER_H
00019 #define QGSNINECELLFILTER_H
00020
00021 #include <QString>
00022 #include "gdal.h"
00023
00024 class QProgressDialog;
00025
00030 class ANALYSIS_EXPORT QgsNineCellFilter
00031 {
00032 public:
00034 QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat );
00035 virtual ~QgsNineCellFilter();
00039 int processRaster( QProgressDialog* p );
00040
00041 private:
00042
00043 QgsNineCellFilter();
00044
00046 GDALDatasetH openInputFile( int& nCellsX, int& nCellsY );
00049 GDALDriverH openOutputDriver();
00052 GDALDatasetH openOutputFile( GDALDatasetH inputDataset, GDALDriverH outputDriver );
00053
00054 protected:
00057 virtual float processNineCellWindow( float* x11, float* x21, float* x31, \
00058 float* x12, float* x22, float* x32, float* x13, float* x23, float* x33 ) = 0;
00059
00060 QString mInputFile;
00061 QString mOutputFile;
00062 QString mOutputFormat;
00063
00064 double mCellSizeX;
00065 double mCellSizeY;
00067 float mInputNodataValue;
00069 float mOutputNodataValue;
00070 };
00071
00072 #endif // QGSNINECELLFILTER_H