Class: QgsContrastEnhancementFunction

class qgis.core.QgsContrastEnhancementFunction

Bases: sip.wrapper

A contrast enhancement function is the base class for all raster contrast enhancements.

The purpose of a contrast enhancement is to enhanceContrast or clip a pixel value into a specified bounding range.

Methods

enhance

A customizable method that takes in a double value and returns a int between 0 and 255.

isValueInDisplayableRange

A customizable method to indicate if a pixel's value is within the displayable range.

maximumValue

Returns the maximum value.

minimumValue

Returns the minimum value.

setMaximumValue

Sets the maximum value.

setMinimumValue

Sets the minimum value.

enhance(self, value: float) int

A customizable method that takes in a double value and returns a int between 0 and 255.

Parameters:

value (float) –

Return type:

int

isValueInDisplayableRange(self, value: float) bool

A customizable method to indicate if a pixel’s value is within the displayable range.

Parameters:

value (float) –

Return type:

bool

maximumValue(self) float

Returns the maximum value.

See also

minimumValue()

New in version 3.2.

Return type:

float

minimumValue(self) float

Returns the minimum value.

See also

maximumValue()

New in version 3.2.

Return type:

float

setMaximumValue(self, value: float)

Sets the maximum value.

See also

maximumValue()

Parameters:

value (float) –

setMinimumValue(self, value: float)

Sets the minimum value.

See also

minimumValue()

Parameters:

value (float) –