Quantum GIS API Documentation  1.7.4
src/core/raster/qgsrasterbandstats.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                         qgsrasterbandstats.h  -  description
00003                               -------------------
00004  begin                : Fri Jun 28 2002
00005  copyright            : (C) 2005 by T.Sutton
00006  email                : tim@linfiniti.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 /* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */
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       histogramVector = new HistogramVector();
00050       isHistogramEstimated = false;
00051       isHistogramOutOfRange = false;
00052     }
00053 
00055     QString bandName;
00056 
00058     int bandNumber;
00059 
00061     QList<QgsColorRampShader::ColorRampItem> colorTable;
00062 
00065     int elementCount;
00066 
00068     bool isHistogramEstimated;
00069 
00071     bool isHistogramOutOfRange;
00072 
00074     HistogramVector * histogramVector;
00075 
00078     double maximumValue;
00079 
00082     double minimumValue;
00083 
00085     double mean;
00086 
00088     double range;
00089 
00091     double stdDev;
00092 
00095     bool statsGathered;
00096 
00098     double sum;
00099 
00101     double sumOfSquares;
00102 };
00103 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines