2005-12-30 04:56:31 +00:00
|
|
|
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The RasterBandStats struct is a container for statistics about a single
|
|
|
|
* raster band.
|
|
|
|
*/
|
|
|
|
class QgsRasterBandStats
|
|
|
|
{
|
2007-01-09 02:39:15 +00:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsrasterbandstats.h>
|
|
|
|
%End
|
|
|
|
|
2005-11-20 01:57:36 +00:00
|
|
|
public:
|
|
|
|
/** \brief The name of the band that these stats belong to. */
|
|
|
|
QString bandName;
|
|
|
|
/** \brief The gdal band number (starts at 1)*/
|
2008-11-01 18:36:02 +00:00
|
|
|
int bandNumber;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief A flag to indicate whether this RasterBandStats struct
|
|
|
|
* is completely populated */
|
2008-11-01 18:36:02 +00:00
|
|
|
bool statsGathered;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The minimum cell value in the raster band. NO_DATA values
|
|
|
|
* are ignored. This does not use the gdal GetMinimum function. */
|
2008-11-01 18:36:02 +00:00
|
|
|
double minimumValue;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The maximum cell value in the raster band. NO_DATA values
|
|
|
|
* are ignored. This does not use the gdal GetMaximmum function. */
|
2008-11-01 18:36:02 +00:00
|
|
|
double maximumValue;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The range is the distance between min & max. */
|
2008-01-11 06:38:10 +00:00
|
|
|
double range;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
|
2008-01-11 06:38:10 +00:00
|
|
|
double mean;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The sum of the squares. Used to calculate standard deviation. */
|
2008-11-01 18:36:02 +00:00
|
|
|
double sumOfSquares;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The standard deviation of the cell values. */
|
2008-01-11 06:38:10 +00:00
|
|
|
double stdDev;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
|
2008-01-11 06:38:10 +00:00
|
|
|
double sum;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief The number of cells in the band. Equivalent to height x width.
|
|
|
|
* TODO: check if NO_DATA are excluded!*/
|
2008-01-11 06:38:10 +00:00
|
|
|
int elementCount;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief Store the histogram for a given layer */
|
2006-05-27 03:55:37 +00:00
|
|
|
typedef QVector<int> HistogramVector;
|
2007-01-09 02:39:15 +00:00
|
|
|
//HistogramVector * histogramVector;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** \brief whteher histogram values are estimated or completely calculated */
|
2008-11-01 22:27:37 +00:00
|
|
|
bool isHistogramEstimated;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** whehter histogram compuation should include out of range values */
|
2008-11-01 22:27:37 +00:00
|
|
|
bool isHistogramOutOfRange;
|
2005-11-20 01:57:36 +00:00
|
|
|
/** Color table */
|
2008-09-02 23:58:38 +00:00
|
|
|
//QList<QgsColorRampShader::ColorRampItem> colorTable;
|
2005-11-20 01:57:36 +00:00
|
|
|
};
|
2007-01-09 02:39:15 +00:00
|
|
|
|