18#ifndef QGSRASTERMINMAXORIGIN_H
19#define QGSRASTERMINMAXORIGIN_H
21#include <QDomDocument>
38 static constexpr double CUMULATIVE_CUT_LOWER = 0.02;
41 static constexpr double CUMULATIVE_CUT_UPPER = 0.98;
44 static constexpr double DEFAULT_STDDEV_FACTOR = 2.0;
135 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const;
138 void readXml(
const QDomElement &elem );
143 static QString limitsString( Limits limits );
146 static Limits limitsFromString(
const QString &limits );
162 Limits mLimits =
None;
163 Extent mExtent = WholeRaster;
164 StatAccuracy mAccuracy = Estimated;
165 double mCumulativeCutLower;
166 double mCumulativeCutUpper;
167 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)