1
/***************************************************************************
2
qgsrasterbandstats.h - description
4
begin : Fri Jun 28 2002
5
copyright : (C) 2005 by T.Sutton
6
email : tim@linfiniti.com
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
17
/* $Id: qgsrasterlayer.h 4380 2005-12-26 23:37:50Z timlinux $ */
19
#ifndef QGSRASTERBANDSTATS
20
#define QGSRASTERBANDSTATS
27
#include "qgscolorrampshader.h"
29
* The RasterBandStats struct is a container for statistics about a single
32
class CORE_EXPORT QgsRasterBandStats
35
typedef QVector<int> HistogramVector;
40
statsGathered = false;
41
minimumValue = std::numeric_limits<double>::max();
42
maximumValue = std::numeric_limits<double>::min();
49
isHistogramEstimated = false;
50
isHistogramOutOfRange = false;
53
/** \brief The name of the band that these stats belong to. */
56
/** \brief The gdal band number (starts at 1)*/
60
QList<QgsColorRampShader::ColorRampItem> colorTable;
62
/** \brief The number of cells in the band. Equivalent to height x width.
63
* TODO: check if NO_DATA are excluded!*/
66
/** \brief whteher histogram values are estimated or completely calculated */
67
bool isHistogramEstimated;
69
/** whehter histogram compuation should include out of range values */
70
bool isHistogramOutOfRange;
72
/** \brief Store the histogram for a given layer */
73
HistogramVector * histogramVector;
75
/** \brief The maximum cell value in the raster band. NO_DATA values
76
* are ignored. This does not use the gdal GetMaximmum function. */
79
/** \brief The minimum cell value in the raster band. NO_DATA values
80
* are ignored. This does not use the gdal GetMinimum function. */
83
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
86
/** \brief The range is the distance between min & max. */
89
/** \brief The standard deviation of the cell values. */
92
/** \brief A flag to indicate whether this RasterBandStats struct
93
* is completely populated */
96
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
99
/** \brief The sum of the squares. Used to calculate standard deviation. */