18 #ifndef QGSRASTERMINMAXORIGIN_H
19 #define QGSRASTERMINMAXORIGIN_H
21 #include <QDomDocument>
23 #include <QDomElement>
25 #include "qgis_core.h"
39 static constexpr
double CUMULATIVE_CUT_LOWER = 0.02;
42 static constexpr
double CUMULATIVE_CUT_UPPER = 0.98;
45 static constexpr
double DEFAULT_STDDEV_FACTOR = 2.0;
136 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const;
139 void readXml(
const QDomElement &elem );
144 static QString limitsString( Limits limits );
147 static Limits limitsFromString(
const QString &limits );
163 Limits mLimits = None;
164 Extent mExtent = WholeRaster;
165 StatAccuracy mAccuracy = Estimated;
166 double mCumulativeCutLower;
167 double mCumulativeCutUpper;
168 double mStdDevFactor;
This class describes the origin of min/max values.
void setExtent(QgsRasterMinMaxOrigin::Extent extent)
Sets the extent.
QgsRasterMinMaxOrigin::StatAccuracy statAccuracy() const
Returns the raster statistic accuracy.
double cumulativeCutLower() const
Returns the lower bound of cumulative cut method (between 0 and 1).
StatAccuracy
This enumerator describes the accuracy used to compute statistics.
QgsRasterMinMaxOrigin::Limits limits() const
Returns the raster limits.
double stdDevFactor() const
Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
void setLimits(QgsRasterMinMaxOrigin::Limits limits)
Sets the limits.
void setStatAccuracy(QgsRasterMinMaxOrigin::StatAccuracy accuracy)
Sets the statistics accuracy.
Extent
This enumerator describes the extent used to compute min/max values.
@ CurrentCanvas
Current extent of the canvas (at the time of computation) is used to compute statistics.
@ WholeRaster
Whole raster is used to compute statistics.
void setCumulativeCutUpper(double val)
Sets the upper bound of cumulative cut method (between 0 and 1).
void setStdDevFactor(double val)
Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
double cumulativeCutUpper() const
Returns the upper bound of cumulative cut method (between 0 and 1).
void setCumulativeCutLower(double val)
Sets the lower bound of cumulative cut method (between 0 and 1).
Limits
This enumerator describes the limits used to compute min/max values.
@ StdDev
Range is [ mean - stdDevFactor() * stddev, mean + stdDevFactor() * stddev ].
@ MinMax
Real min-max values.
QgsRasterMinMaxOrigin::Extent extent() const
Returns the raster extent.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)