Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgsrasterbandstats.h - description 00003 ------------------- 00004 begin : Fri Jun 28 2002 00005 copyright : (C) 2005 by T.Sutton 00006 email : [email protected] 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 QGSRASTERBANDSTATS 00019 #define QGSRASTERBANDSTATS 00020 00021 #include <QString> 00022 #include <QVector> 00023 00024 #include <limits> 00025 00026 #include "qgscolorrampshader.h" 00031 class CORE_EXPORT QgsRasterBandStats 00032 { 00033 public: 00034 typedef QVector<int> HistogramVector; 00035 00036 QgsRasterBandStats() 00037 { 00038 bandName = ""; 00039 statsGathered = false; 00040 minimumValue = std::numeric_limits<double>::max(); 00041 maximumValue = std::numeric_limits<double>::min(); 00042 range = 0.0; 00043 mean = 0.0; 00044 sumOfSquares = 0.0; 00045 stdDev = 0.0; 00046 sum = 0.0; 00047 elementCount = 0; 00048 histogramVector = new HistogramVector(); 00049 isHistogramEstimated = false; 00050 isHistogramOutOfRange = false; 00051 } 00052 00054 QString bandName; 00055 00057 int bandNumber; 00058 00060 QList<QgsColorRampShader::ColorRampItem> colorTable; 00061 00064 int elementCount; 00065 00067 bool isHistogramEstimated; 00068 00070 bool isHistogramOutOfRange; 00071 00073 HistogramVector * histogramVector; 00074 00077 double maximumValue; 00078 00081 double minimumValue; 00082 00084 double mean; 00085 00087 double range; 00088 00090 double stdDev; 00091 00094 bool statsGathered; 00095 00097 double sum; 00098 00100 double sumOfSquares; 00101 }; 00102 #endif