Class: QgsSingleBandGrayRenderer¶
-
class
qgis.core.
QgsSingleBandGrayRenderer
¶ Bases:
QgsRasterRenderer
Raster renderer pipe for single band gray.
Methods
- param bandNo
QgsSingleBandGrayRenderer
cannot be copied.- rtype
QgsContrastEnhancement
- param elem
- rtype
QgsSingleBandGrayRenderer.Gradient
- rtype
int
Fill in histogram defaults if not specified
Fill in statistics defaults if not specified
- rtype
List[Tuple[str, QColor]]
Takes ownership
- param gradient
- param band
- param doc
- rtype
List[int]
- param doc
Attributes
-
BlackToWhite
= 0¶
-
class
Gradient
¶ Bases:
int
-
WhiteToBlack
= 1¶
-
block
(self, bandNo: int, extent: QgsRectangle, width: int, height: int, feedback: QgsRasterBlockFeedback = None) → QgsRasterBlock¶ - Parameters
bandNo (int) –
extent (QgsRectangle) –
width (int) –
height (int) –
feedback (
QgsRasterBlockFeedback
= None) –
- Return type
-
clone
(self) → QgsSingleBandGrayRenderer¶ QgsSingleBandGrayRenderer
cannot be copied. Use clone() instead.- Return type
-
contrastEnhancement
(self) → QgsContrastEnhancement¶ - Return type
-
create
(elem: QDomElement, input: QgsRasterInterface) → QgsRasterRenderer¶ - Parameters
elem (QDomElement) –
input (QgsRasterInterface) –
- Return type
-
gradient
(self) → QgsSingleBandGrayRenderer.Gradient¶ - Return type
-
grayBand
(self) → int¶ - Return type
int
-
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
-
legendSymbologyItems
(self) → List[Tuple[str, QColor]]¶ - Return type
List[Tuple[str, QColor]]
-
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) –