00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef QGSRASTERBANDSTATS
00020 #define QGSRASTERBANDSTATS
00021
00022 #include <QString>
00023 #include <QVector>
00024
00025 #include <limits>
00026
00027 #include "qgscolorrampshader.h"
00032 class CORE_EXPORT QgsRasterBandStats
00033 {
00034 public:
00035 typedef QVector<int> HistogramVector;
00036
00037 QgsRasterBandStats()
00038 {
00039 bandName = "";
00040 statsGathered = false;
00041 minimumValue = std::numeric_limits<double>::max();
00042 maximumValue = std::numeric_limits<double>::min();
00043 range = 0.0;
00044 mean = 0.0;
00045 sumOfSquares = 0.0;
00046 stdDev = 0.0;
00047 sum = 0.0;
00048 elementCount = 0;
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