21 #ifndef QGSCONTRASTENHANCEMENT_H 22 #define QGSCONTRASTENHANCEMENT_H 24 #include "qgis_core.h" 54 UserDefinedEnhancement
111 int enhanceContrast(
double value );
117 bool isValueInDisplayableRange(
double value );
144 void setMaximumValue(
double value,
bool generateTable =
true );
156 void setMinimumValue(
double value,
bool generateTable =
true );
158 void writeXml( QDomDocument &doc, QDomElement &parentElem )
const;
160 void readXml(
const QDomElement &elem );
171 std::unique_ptr< QgsContrastEnhancementFunction > mContrastEnhancementFunction;
174 bool mEnhancementDirty =
false;
177 double mLookupTableOffset;
180 int *mLookupTable =
nullptr;
183 double mMinimumValue;
186 double mMaximumValue;
192 double mRasterDataTypeRange;
195 bool generateLookupTable();
198 int calculateContrastEnhancementValue(
double );
double maximumValue() const
Returns the maximum value for the contrast enhancement range.
DataType
Raster data types.
double minimumValue() const
Returns the minimum value for the contrast enhancement range.
A contrast enhancement function is the base class for all raster contrast enhancements.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into allowing algorithms to be written in pure substantial changes are required in order to port existing x Processing algorithms for QGIS x The most significant changes are outlined not GeoAlgorithm For algorithms which operate on features one by consider subclassing the QgsProcessingFeatureBasedAlgorithm class This class allows much of the boilerplate code for looping over features from a vector layer to be bypassed and instead requires implementation of a processFeature method Ensure that your algorithm(or algorithm 's parent class) implements the new pure virtual createInstance(self) call
ContrastEnhancementAlgorithm
This enumerator describes the types of contrast enhancement algorithms that can be used...
ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() const
Manipulates raster pixel values so that they enhanceContrast or clip into a specified numerical range...
Eight bit unsigned integer (quint8)