Quantum GIS API Documentation  1.7.4
src/analysis/raster/qgsninecellfilter.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           qgsninecellfilter.h  -  description
00003                              -------------------
00004     begin                : August 6th, 2009
00005     copyright            : (C) 2009 by Marco Hugentobler
00006     email                : marco dot hugentobler at karto dot baug dot ethz 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 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     //default constructor forbidden. We need input file, output file and format obligatory
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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines