00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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