Subgroup: Single

Class: QgsSingleBandGrayRenderer

class qgis.core.QgsSingleBandGrayRenderer

Bases: qgis._core.QgsRasterRenderer

Raster renderer pipe for single band gray.

Methods

alphaBand
bandCount
bandStatistics Get band statistics.
block
capabilities Returns a bitmask containing the supported capabilities
capabilitiesString Returns the above in friendly format.
clone QgsSingleBandGrayRenderer cannot be copied.
contrastEnhancement
copyCommonProperties Copies common properties like opacity / transparency data from other renderer.
create
cumulativeCut Find values for cumulative pixel count cut.
dataType
dataTypeSize
extent Get the extent of the interface.
generateBandName helper function to create zero padded band names
gradient
grayBand
hasHistogram Returns true if histogram is available (cached, already calculated)
hasStatistics Returns true if histogram is available (cached, already calculated).
histogram Get histogram.
initHistogram
initStatistics
input Current input
legendSymbologyItems
minMaxOrigin Returns const reference to origin of min/max values
on Is on/off
opacity Returns the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque).
rasterTransparency
readXml Sets base class members from xml.
setAlphaBand
setContrastEnhancement Takes ownership
setGradient
setGrayBand
setInput
setMinMaxOrigin Sets origin of min/max values
setOn Set on/off
setOpacity Sets the opacity for the renderer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque).
setRasterTransparency
sourceDataType Returns source data type for the band specified by number,
sourceInput Get source / raw input, the first in pipe, usually provider.
type
usesBands
usesTransparency
writeXml
xBlockSize Get block size
xSize Get raster size
yBlockSize
ySize

Attributes

BlackToWhite
BuildPyramids
Create
Identify
IdentifyFeature
IdentifyHtml
IdentifyText
IdentifyValue
NODATA_COLOR
NoCapabilities
Remove
Size
WhiteToBlack
BlackToWhite = 0
class Gradient

Bases: int

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

QgsSingleBandGrayRenderer cannot be copied. Use clone() instead.

contrastEnhancement(self) → QgsContrastEnhancement
create(elem: QDomElement, input: QgsRasterInterface) → QgsRasterRenderer
gradient(self) → QgsSingleBandGrayRenderer.Gradient
grayBand(self) → int
initHistogram()
initStatistics()
legendSymbologyItems(self) → List[Tuple[str, QColor]]
setContrastEnhancement(self, ce: QgsContrastEnhancement)

Takes ownership

setGradient(self, gradient: QgsSingleBandGrayRenderer.Gradient)
setGrayBand(self, band: int)
usesBands(self) → List[int]
writeXml(self, doc: QDomDocument, parentElem: QDomElement)