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;
125 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const;
128 void readXml(
const QDomElement &elem );
133 static QString limitsString(
Limits limits );
136 static Limits limitsFromString(
const QString &limits );
153 Extent mExtent = WholeRaster;
155 double mCumulativeCutLower;
156 double mCumulativeCutUpper;
157 double mStdDevFactor;
160 #endif // QGSRASTERMINMAXORIGIN_H double stdDevFactor() const
Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ]...
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QgsRasterMinMaxOrigin::StatAccuracy statAccuracy() const
Returns the raster statistic accuracy.
Extent
This enumerator describes the extent used to compute min/max values.
StatAccuracy
This enumerator describes the accuracy used to compute statistics.
Current extent of the canvas (at the time of computation) is used to compute statistics.
void setExtent(QgsRasterMinMaxOrigin::Extent extent)
Sets the extent.
This class describes the origin of min/max values.
QgsRasterMinMaxOrigin::Extent extent() const
Returns the raster extent.
QgsRasterMinMaxOrigin::Limits limits() const
Returns the raster limits.
Range is [ mean - stdDevFactor() * stddev, mean + stdDevFactor() * stddev ].
void setStdDevFactor(double val)
Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ]...
Limits
This enumerator describes the limits used to compute min/max values.
void setCumulativeCutLower(double val)
Sets the lower bound of cumulative cut method (between 0 and 1).
void setLimits(QgsRasterMinMaxOrigin::Limits limits)
Sets the limits.
void setStatAccuracy(QgsRasterMinMaxOrigin::StatAccuracy accuracy)
Sets the statistics accuracy.
Whole raster is used to compute statistics.
double cumulativeCutLower() const
Returns the lower bound of cumulative cut method (between 0 and 1).
double cumulativeCutUpper() const
Returns the upper bound of cumulative cut method (between 0 and 1).
void setCumulativeCutUpper(double val)
Sets the upper bound of cumulative cut method (between 0 and 1).