QgsRasterMinMaxOrigin class

This class describes the origin of min/max values.

It does not store by itself the min/max values.

Public types

enum Extent { WholeRaster, CurrentCanvas, UpdatedCanvas }
This enumerator describes the extent used to compute min/max values.
enum Limits { None, MinMax, StdDev, CumulativeCut }
This enumerator describes the limits used to compute min/max values.
enum StatAccuracy { Exact, Estimated }
This enumerator describes the accuracy used to compute statistics.

Public static variables

static double CUMULATIVE_CUT_LOWER constexpr
Default cumulative cut lower limit.
static double CUMULATIVE_CUT_UPPER constexpr
Default cumulative cut upper limit.
static double DEFAULT_STDDEV_FACTOR constexpr
Default standard deviation factor.

Public static functions

static auto extentFromString(const QString& extent) -> QgsRasterMinMaxOrigin::Extent
Deserialize Extent.
static auto extentString(QgsRasterMinMaxOrigin::Extent extent) -> QString
Returns a string to serialize Extent.
static auto limitsFromString(const QString& limits) -> Limits
Deserialize Limits.
static auto limitsString(Limits limits) -> QString
Returns a string to serialize Limits.
static auto statAccuracyFromString(const QString& accuracy) -> QgsRasterMinMaxOrigin::StatAccuracy
Deserialize StatAccuracy.
static auto statAccuracyString(QgsRasterMinMaxOrigin::StatAccuracy accuracy) -> QString
Returns a string to serialize StatAccuracy.

Constructors, destructors, conversion operators

QgsRasterMinMaxOrigin()
Default constructor.

Public functions

auto cumulativeCutLower() const -> double
Returns the lower bound of cumulative cut method (between 0 and 1).
auto cumulativeCutUpper() const -> double
Returns the upper bound of cumulative cut method (between 0 and 1).
auto extent() const -> QgsRasterMinMaxOrigin::Extent
Returns the raster extent.
auto limits() const -> QgsRasterMinMaxOrigin::Limits
Returns the raster limits.
auto operator==(const QgsRasterMinMaxOrigin& other) const -> bool
Equality operator.
void readXml(const QDomElement& elem)
Deserialize object.
void setCumulativeCutLower(double val)
Sets the lower 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).
void setExtent(QgsRasterMinMaxOrigin::Extent extent)
Sets the extent.
void setLimits(QgsRasterMinMaxOrigin::Limits limits)
Sets the limits.
void setStatAccuracy(QgsRasterMinMaxOrigin::StatAccuracy accuracy)
Sets the statistics accuracy.
void setStdDevFactor(double val)
Sets the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
auto statAccuracy() const -> QgsRasterMinMaxOrigin::StatAccuracy
Returns the raster statistic accuracy.
auto stdDevFactor() const -> double
Returns the factor f so that the min/max range is [ mean - f * stddev , mean + f * stddev ].
void writeXml(QDomDocument& doc, QDomElement& parentElem) const
Serialize object.

Enum documentation

enum QgsRasterMinMaxOrigin::Extent

This enumerator describes the extent used to compute min/max values.

Enumerators
WholeRaster

Whole raster is used to compute statistics.

CurrentCanvas

Current extent of the canvas (at the time of computation) is used to compute statistics.

UpdatedCanvas

Constantly updated extent of the canvas is used to compute statistics.

enum QgsRasterMinMaxOrigin::Limits

This enumerator describes the limits used to compute min/max values.

Enumerators
None

User defined.

MinMax

Real min-max values.

StdDev

Range is [ mean - stdDevFactor() * stddev, mean + stdDevFactor() * stddev ].

CumulativeCut

Range is [ min + cumulativeCutLower() * (max - min), min + cumulativeCutUpper() * (max - min) ].

enum QgsRasterMinMaxOrigin::StatAccuracy

This enumerator describes the accuracy used to compute statistics.

Enumerators
Exact

Exact statistics.

Estimated

Approximated statistics.