QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsClipToMinMaxEnhancement Class Reference

A raster contrast enhancement that will clip a value to the specified min/max range. More...

#include <qgscliptominmaxenhancement.h>

Inheritance diagram for QgsClipToMinMaxEnhancement:
Inheritance graph
[legend]

Public Member Functions

 QgsClipToMinMaxEnhancement (Qgis::DataType, double, double)
 
int enhance (double) override
 A customizable method that takes in a double value and returns a int between 0 and 255.
 
bool isValueInDisplayableRange (double) override
 A customizable method to indicate if a pixel's value is within the displayable range.
 
- Public Member Functions inherited from QgsContrastEnhancementFunction
 QgsContrastEnhancementFunction (const QgsContrastEnhancementFunction &f)
 
 QgsContrastEnhancementFunction (Qgis::DataType, double, double)
 
virtual ~QgsContrastEnhancementFunction ()=default
 
double maximumValue () const
 Returns the maximum value.
 
double minimumValue () const
 Returns the minimum value.
 
QgsContrastEnhancementFunctionoperator= (const QgsContrastEnhancementFunction &)=delete
 
void setMaximumValue (double value)
 Sets the maximum value.
 
void setMinimumValue (double value)
 Sets the minimum value.
 

Additional Inherited Members

- Protected Attributes inherited from QgsContrastEnhancementFunction
double mMaximumValue
 User defineable maximum value for the band, used for enhanceContrasting.
 
double mMaximumValuePossible = std::numeric_limits< double >::max()
 
double mMinimumMaximumRange
 Minimum maximum range for the band, used for enhanceContrasting.
 
double mMinimumValue
 User defineable minimum value for the band, used for enhanceContrasting.
 
double mMinimumValuePossible = std::numeric_limits< double >::lowest()
 
Qgis::DataType mQgsRasterDataType
 Data type of the band.
 

Detailed Description

A raster contrast enhancement that will clip a value to the specified min/max range.

For example if a min max range of [10,240] is specified in the constructor, and a value of 250 is called using enhance(), the value will be truncated ('clipped') to 240.

Definition at line 33 of file qgscliptominmaxenhancement.h.

Constructor & Destructor Documentation

◆ QgsClipToMinMaxEnhancement()

QgsClipToMinMaxEnhancement::QgsClipToMinMaxEnhancement ( Qgis::DataType  qgsRasterDataType,
double  minimumValue,
double  maximumValue 
)

Definition at line 22 of file qgscliptominmaxenhancement.cpp.

Member Function Documentation

◆ enhance()

int QgsClipToMinMaxEnhancement::enhance ( double  value)
overridevirtual

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

Reimplemented from QgsContrastEnhancementFunction.

Definition at line 26 of file qgscliptominmaxenhancement.cpp.

◆ isValueInDisplayableRange()

bool QgsClipToMinMaxEnhancement::isValueInDisplayableRange ( double  value)
overridevirtual

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

Reimplemented from QgsContrastEnhancementFunction.

Definition at line 43 of file qgscliptominmaxenhancement.cpp.


The documentation for this class was generated from the following files: