QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
raster
qgsrasterhistogram.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterhistogram.h
3
-------------------
4
begin : July 2012
5
copyright : (C) 2012 by Radim Blazek
6
email : radim dot blazek at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
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. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSRASTERHISTOGRAM
19
#define QGSRASTERHISTOGRAM
20
21
#include <limits>
22
23
#include "qgis_core.h"
24
#include "
qgsrectangle.h
"
25
26
#include <QString>
27
#include <QVector>
28
35
class
CORE_EXPORT
QgsRasterHistogram
36
{
37
public
:
38
typedef
QVector<int>
HistogramVector
;
39
43
QgsRasterHistogram
() =
default
;
44
46
bool
operator==
(
const
QgsRasterHistogram
&h )
const
47
{
48
return
(
49
h.
bandNumber
==
bandNumber
50
&& h.
binCount
==
binCount
51
&& h.
includeOutOfRange
==
includeOutOfRange
52
&&
qgsDoubleNear
( h.
maximum
,
maximum
)
53
&&
qgsDoubleNear
( h.
minimum
,
minimum
)
54
&& h.
extent
==
extent
55
&& h.
width
==
width
56
&& h.
height
==
height
57
);
58
}
59
61
int
bandNumber
= 0;
62
64
int
binCount
= 0;
65
67
int
nonNullCount
= 0;
68
70
bool
includeOutOfRange
=
false
;
71
75
QgsRasterHistogram::HistogramVector
histogramVector
;
76
78
double
maximum
= 0;
79
81
double
minimum
= 0;
82
84
int
width
= 0;
85
87
int
height
= 0;
88
90
QgsRectangle
extent
;
91
93
bool
valid
=
false
;
94
};
95
#endif
QgsRasterHistogram::operator==
bool operator==(const QgsRasterHistogram &h) const
Compares region, size etc. not histogram itself.
Definition
qgsrasterhistogram.h:46
QgsRasterHistogram::minimum
double minimum
The minimum histogram value.
Definition
qgsrasterhistogram.h:81
QgsRasterHistogram::bandNumber
int bandNumber
The gdal band number (starts at 1).
Definition
qgsrasterhistogram.h:61
QgsRasterHistogram::maximum
double maximum
The maximum histogram value.
Definition
qgsrasterhistogram.h:78
QgsRasterHistogram::QgsRasterHistogram
QgsRasterHistogram()=default
Constructor for an invalid QgsRasterHistogram.
QgsRasterHistogram::includeOutOfRange
bool includeOutOfRange
Whether histogram includes out of range values (in first and last bin).
Definition
qgsrasterhistogram.h:70
QgsRasterHistogram::extent
QgsRectangle extent
Extent used to calc histogram.
Definition
qgsrasterhistogram.h:90
QgsRasterHistogram::nonNullCount
int nonNullCount
The number of non NULL cells used to calculate histogram.
Definition
qgsrasterhistogram.h:67
QgsRasterHistogram::histogramVector
QgsRasterHistogram::HistogramVector histogramVector
Stores the histogram for a given layer.
Definition
qgsrasterhistogram.h:75
QgsRasterHistogram::HistogramVector
QVector< int > HistogramVector
Definition
qgsrasterhistogram.h:38
QgsRasterHistogram::height
int height
Number of rows used to calc histogram.
Definition
qgsrasterhistogram.h:87
QgsRasterHistogram::width
int width
Number of columns used to calc histogram.
Definition
qgsrasterhistogram.h:84
QgsRasterHistogram::valid
bool valid
Histogram is valid.
Definition
qgsrasterhistogram.h:93
QgsRasterHistogram::binCount
int binCount
Number of bins (intervals,buckets) in histogram.
Definition
qgsrasterhistogram.h:64
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
qgsDoubleNear
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference).
Definition
qgis.h:7743
qgsrectangle.h
Generated on
for QGIS API Documentation by
1.17.0