QGIS/python/core/raster/qgscontrastenhancement.sip

132 lines
4.0 KiB
Plaintext
Raw Normal View History

2017-06-01 10:54:33 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgscontrastenhancement.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsContrastEnhancement
{
2017-06-01 10:54:33 +02:00
%Docstring
Manipulates raster pixel values so that they enhanceContrast or clip into a
specified numerical range according to the specified
ContrastEnhancementAlgorithm.
%End
2017-06-01 10:54:33 +02:00
%TypeHeaderCode
#include "qgscontrastenhancement.h"
%End
public:
enum ContrastEnhancementAlgorithm
{
2017-06-01 10:54:33 +02:00
NoEnhancement,
StretchToMinimumMaximum,
StretchAndClipToMinimumMaximum,
ClipToMinimumMaximum,
UserDefinedEnhancement
};
QgsContrastEnhancement( Qgis::DataType datatype = Qgis::Byte );
2017-06-01 10:54:33 +02:00
QgsContrastEnhancement( const QgsContrastEnhancement &ce );
~QgsContrastEnhancement();
2017-06-01 10:54:33 +02:00
static double maximumValuePossible( Qgis::DataType );
2017-06-01 10:54:33 +02:00
%Docstring
Helper function that returns the maximum possible value for a GDAL data type
:rtype: float
%End
static double minimumValuePossible( Qgis::DataType );
2017-06-01 10:54:33 +02:00
%Docstring
Helper function that returns the minimum possible value for a GDAL data type
:rtype: float
%End
static QString contrastEnhancementAlgorithmString( ContrastEnhancementAlgorithm algorithm );
%Docstring
Return a string to serialize ContrastEnhancementAlgorithm
:rtype: str
%End
static ContrastEnhancementAlgorithm contrastEnhancementAlgorithmFromString( const QString &contrastEnhancementString );
%Docstring
Deserialize ContrastEnhancementAlgorithm
:rtype: ContrastEnhancementAlgorithm
%End
double maximumValue() const;
2017-06-01 10:54:33 +02:00
%Docstring
Return the maximum value for the contrast enhancement range.
:rtype: float
%End
double minimumValue() const;
2017-06-01 10:54:33 +02:00
%Docstring
Return the minimum value for the contrast enhancement range.
:rtype: float
%End
ContrastEnhancementAlgorithm contrastEnhancementAlgorithm() const;
2017-06-01 10:54:33 +02:00
%Docstring
:rtype: ContrastEnhancementAlgorithm
%End
int enhanceContrast( double );
2017-06-01 10:54:33 +02:00
%Docstring
Apply the contrast enhancement to a value. Return values are 0 - 254, -1 means the pixel was clipped and should not be displayed
:rtype: int
%End
bool isValueInDisplayableRange( double );
2017-06-01 10:54:33 +02:00
%Docstring
Return true if pixel is in stretable range, false if pixel is outside of range (i.e., clipped)
:rtype: bool
%End
void setContrastEnhancementAlgorithm( ContrastEnhancementAlgorithm, bool generateTable = true );
2017-06-01 10:54:33 +02:00
%Docstring
Set the contrast enhancement algorithm
%End
2017-06-01 10:54:33 +02:00
void setContrastEnhancementFunction( QgsContrastEnhancementFunction * );
%Docstring
A public method that allows the user to set their own custom contrast enhancement function
%End
void setMaximumValue( double, bool generateTable = true );
2017-06-01 10:54:33 +02:00
%Docstring
Set the maximum value for the contrast enhancement range.
%End
void setMinimumValue( double, bool generateTable = true );
2017-06-01 10:54:33 +02:00
%Docstring
Return the minimum value for the contrast enhancement range.
%End
void writeXml( QDomDocument &doc, QDomElement &parentElem ) const;
void readXml( const QDomElement &elem );
private:
2017-06-01 10:54:33 +02:00
const QgsContrastEnhancement &operator=( const QgsContrastEnhancement & );
%Docstring
:rtype: QgsContrastEnhancement
%End
};
2017-06-01 10:54:33 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgscontrastenhancement.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/