Class: QgsSingleBandGrayRenderer

class qgis.core.QgsSingleBandGrayRenderer

Bases: QgsRasterRenderer

Raster renderer pipe for single band gray.

Methods

block

param bandNo

clone

QgsSingleBandGrayRenderer cannot be copied.

contrastEnhancement

rtype

QgsContrastEnhancement

create

param elem

gradient

rtype

QgsSingleBandGrayRenderer.Gradient

grayBand

rtype

int

initHistogram

initStatistics

legendSymbologyItems

rtype

List[Tuple[str, QColor]]

renderColorForNodataPixel

setContrastEnhancement

Takes ownership

setGradient

param gradient

setGrayBand

param band

toSld

param doc

usesBands

rtype

List[int]

writeXml

param doc

Attributes

BlackToWhite

WhiteToBlack

BlackToWhite = 0
class Gradient

Bases: int

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

QgsRasterBlock

clone(self) → QgsSingleBandGrayRenderer

QgsSingleBandGrayRenderer cannot be copied. Use clone() instead.

Return type

QgsSingleBandGrayRenderer

contrastEnhancement(self) → QgsContrastEnhancement
Return type

QgsContrastEnhancement

create(elem: QDomElement, input: QgsRasterInterface) → QgsRasterRenderer
Parameters
Return type

QgsRasterRenderer

gradient(self) → QgsSingleBandGrayRenderer.Gradient
Return type

QgsSingleBandGrayRenderer.Gradient

grayBand(self) → int
Return type

int

initHistogram()
initStatistics()
legendSymbologyItems(self) → List[Tuple[str, QColor]]
Return type

List[Tuple[str, QColor]]

renderColorForNodataPixel()
setContrastEnhancement(self, ce: QgsContrastEnhancement)

Takes ownership

Parameters

ce (QgsContrastEnhancement) –

setGradient(self, gradient: QgsSingleBandGrayRenderer.Gradient)
Parameters

gradient (QgsSingleBandGrayRenderer.Gradient) –

setGrayBand(self, band: int)
Parameters

band (int) –

toSld(self, doc: QDomDocument, element: QDomElement, props: Dict[str, str] = {})
Parameters
  • doc (QDomDocument) –

  • element (QDomElement) –

  • props (Dict[str) –

usesBands(self) → List[int]
Return type

List[int]

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

  • parentElem (QDomElement) –