|
Quantum GIS API Documentation
master-ce49b66
|
00001 /*************************************************************************** 00002 qgsrasternuller.h 00003 ------------------- 00004 begin : August 2012 00005 copyright : (C) 2012 by Radim Blazek 00006 email : radim dot blazek at gmail dot com 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 QGSRASTERNULLER_H 00019 #define QGSRASTERNULLER_H 00020 00021 #include "qgsrasterdataprovider.h" 00022 #include "qgsrasterrange.h" 00023 #include "qgsrasterinterface.h" 00024 00025 #include <QList> 00026 00030 class CORE_EXPORT QgsRasterNuller : public QgsRasterInterface 00031 { 00032 public: 00033 QgsRasterNuller( QgsRasterInterface* input = 0 ); 00034 ~QgsRasterNuller(); 00035 00036 struct NoData 00037 { 00038 double min; 00039 double max; 00040 }; 00041 00042 QgsRasterInterface * clone() const; 00043 00044 int bandCount() const; 00045 00046 QGis::DataType dataType( int bandNo ) const; 00047 00048 QgsRasterBlock* block( int bandNo, const QgsRectangle &extent, int width, int height ); 00049 00050 void setNoData( int bandNo, QgsRasterRangeList noData ); 00051 00052 QgsRasterRangeList noData( int bandNo ) const { return mNoData.value( bandNo -1 ); } 00053 00055 void setOutputNoDataValue( int bandNo, double noData ); 00056 00057 private: 00058 // no data indext from 0 00059 QVector< QgsRasterRangeList > mNoData; 00060 // no data to be set in output, indexed form 0 00061 QVector<double> mOutputNoData; 00062 QVector<bool> mHasOutputNoData; 00063 }; 00064 00065 #endif // QGSRASTERNULLER_H