Class: QgsHueSaturationFilter

class qgis.core.QgsHueSaturationFilter

Bases: QgsRasterInterface

Color and saturation filter pipe for rasters.

Methods

bandCount

rtype

int

block

param bandNo

clone

rtype

QgsHueSaturationFilter

colorizeColor

rtype

QColor

colorizeOn

rtype

bool

colorizeStrength

rtype

int

dataType

param bandNo

grayscaleMode

rtype

QgsHueSaturationFilter.GrayscaleMode

initHistogram

Fill in histogram defaults if not specified

initStatistics

Fill in statistics defaults if not specified

readXml

Sets base class members from xml.

saturation

rtype

int

setColorizeColor

param colorizeColor

setColorizeOn

param colorizeOn

setColorizeStrength

param colorizeStrength

setGrayscaleMode

param grayscaleMode

setInput

param input

setSaturation

param saturation

writeXml

param doc

Attributes

GrayscaleAverage

GrayscaleLightness

GrayscaleLuminosity

GrayscaleOff

GrayscaleAverage = 3
GrayscaleLightness = 1
GrayscaleLuminosity = 2
class GrayscaleMode

Bases: int

GrayscaleOff = 0
bandCount(self) → int
Return type

int

block(self, bandNo: int, extent: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback = None)QgsRasterBlock
Parameters
Return type

QgsRasterBlock

clone(self)QgsHueSaturationFilter
Return type

QgsHueSaturationFilter

colorizeColor(self) → QColor
Return type

QColor

colorizeOn(self) → bool
Return type

bool

colorizeStrength(self) → int
Return type

int

dataType(self, bandNo: int)Qgis.DataType
Parameters

bandNo (int) –

Return type

Qgis.DataType

grayscaleMode(self)QgsHueSaturationFilter.GrayscaleMode
Return type

QgsHueSaturationFilter.GrayscaleMode

initHistogram(self, histogram: QgsRasterHistogram, bandNo: int, binCount: int, minimum: object = Py_None, maximum: object = Py_None, boundingBox: QgsRectangle = QgsRectangle(), sampleSize: int = 0, includeOutOfRange: bool = False)

Fill in histogram defaults if not specified

Note

the parameters are the same as in histogram()

initStatistics(self, statistics: QgsRasterBandStats, bandNo: int, stats: int = QgsRasterBandStats.All, boundingBox: QgsRectangle = QgsRectangle(), binCount: int = 0)

Fill in statistics defaults if not specified

readXml(self, filterElem: QDomElement)

Sets base class members from xml. Usually called from create() methods of subclasses

Parameters

filterElem (QDomElement) –

saturation(self) → int
Return type

int

setColorizeColor(self, colorizeColor: Union[QColor, Qt.GlobalColor, QGradient])
Parameters

colorizeColor (Union[QColor) –

setColorizeOn(self, colorizeOn: bool)
Parameters

colorizeOn (bool) –

setColorizeStrength(self, colorizeStrength: int)
Parameters

colorizeStrength (int) –

setGrayscaleMode(self, grayscaleMode: QgsHueSaturationFilter.GrayscaleMode)
Parameters

grayscaleMode (QgsHueSaturationFilter.GrayscaleMode) –

setInput(self, input: QgsRasterInterface) → bool
Parameters

input (QgsRasterInterface) –

Return type

bool

setSaturation(self, saturation: int)
Parameters

saturation (int) –

writeXml(self, doc: QDomDocument, parentElem: QDomElement)
Parameters
  • doc (QDomDocument) –

  • parentElem (QDomElement) –