Class: QgsContrastEnhancementFunction¶
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.
Class Hierarchy¶
Subclasses¶
A raster contrast enhancement that will clip a value to the specified min/max range.  | 
|
A color enhancement function that performs a linear enhanceContrast between min and max.  | 
|
A linear enhanceContrast enhancement that first clips to min max and then enhanceContrastes linearly between min and max.  | 
Methods
A customizable method that takes in a double value and returns a int between 0 and 255.  | 
|
A customizable method to indicate if a pixel's value is within the displayable range.  | 
|
Returns the maximum value.  | 
|
Returns the minimum value.  | 
|
Sets the maximum value.  | 
|
Sets the minimum value.  | 
- class qgis.core.QgsContrastEnhancementFunction[source]¶
 Bases:
object- enhance(self, value: float) int[source]¶
 A customizable method that takes in a double
valueand returns a int between 0 and 255.- Parameters:
 value (float)
- Return type:
 int
- isValueInDisplayableRange(self, value: float) bool[source]¶
 A customizable method to indicate if a pixel’s value is within the displayable range.
- Parameters:
 value (float)
- Return type:
 bool
- maximumValue(self) float[source]¶
 Returns the maximum value.
See also
See also
Added in version 3.2.
- Return type:
 float
- minimumValue(self) float[source]¶
 Returns the minimum value.
See also
See also
Added in version 3.2.
- Return type:
 float
- setMaximumValue(self, value: float)[source]¶
 Sets the maximum
value.See also
See also
- Parameters:
 value (float)