Class: QgsRasterPipe¶
Contains a pipeline of raster interfaces for sequential raster processing.
Enums
Data definable properties.  | 
|
alias of   | 
|
alias of   | 
Methods
Returns the interface at the specified index.  | 
|
Returns the brightness filter interface, or   | 
|
Returns   | 
|
Returns a reference to the pipe's property collection, used for data defined overrides.  | 
|
Evaluates any data defined properties set on the pipe, applying their results to the corresponding interfaces in place.  | 
|
Returns the hue/saturation interface, or   | 
|
Attempts to insert interface at specified index and connect if connection would fail, the interface is not inserted and   | 
|
Returns last interface in the pipe.  | 
|
Moves the pipe to another thread.  | 
|
Returns the raster nuller interface, or   | 
|
Returns the projector interface, or   | 
|
Returns the data provider interface, or   | 
|
Removes and deletes the interface at given index (if possible).  | 
|
Returns the raster renderer interface, or   | 
|
Attempts to replace the interface at specified index and reconnect the pipe.  | 
|
Returns the resample filter interface, or   | 
|
Returns which stage of the pipe should apply resampling  | 
|
Inserts a new known interface in default place or replace interface of the same role if it already exists.  | 
|
Sets the pipe's property collection, used for data defined overrides.  | 
|
Set whether the interface at the specified index is enabled.  | 
|
Sets which stage of the pipe should apply resampling.  | 
|
Returns the size of the pipe (the number of interfaces contained in the pipe).  | 
Static Methods
Returns the definitions for data defined properties available for use in raster pipes.  | 
- class qgis.core.QgsRasterPipe[source]¶
 Bases:
object- __init__()
 Constructor for an empty QgsRasterPipe.
- class Property(*values)¶
 Bases:
IntEnumData definable properties.
Added in version 3.22.
RendererOpacity: Raster renderer global opacity
- ResamplingStage¶
 alias of
RasterResamplingStage
- Role¶
 alias of
RasterPipeInterfaceRole
- at(self, idx: int) QgsRasterInterface | None[source]¶
 Returns the interface at the specified index.
- Parameters:
 idx (int)
- Return type:
 Optional[QgsRasterInterface]
- brightnessFilter(self) QgsBrightnessContrastFilter | None[source]¶
 Returns the brightness filter interface, or
Noneif no brightness filter is present in the pipe.- Return type:
 Optional[QgsBrightnessContrastFilter]
- canSetOn(self, idx: int, on: bool) bool[source]¶
 Returns
Trueif the interface at the specified index may be switched on or off.- Parameters:
 idx (int)
on (bool)
- Return type:
 bool
- dataDefinedProperties(self) QgsPropertyCollection¶
 Returns a reference to the pipe’s property collection, used for data defined overrides.
See also
Added in version 3.22.
- Return type:
 
- evaluateDataDefinedProperties(self, context: QgsExpressionContext)[source]¶
 Evaluates any data defined properties set on the pipe, applying their results to the corresponding interfaces in place.
Added in version 3.22.
- Parameters:
 context (QgsExpressionContext)
- hueSaturationFilter(self) QgsHueSaturationFilter | None[source]¶
 Returns the hue/saturation interface, or
Noneif no hue/saturation filter is present in the pipe.- Return type:
 Optional[QgsHueSaturationFilter]
- insert(self, idx: int, interface: QgsRasterInterface | None) bool[source]¶
 Attempts to insert interface at specified index and connect if connection would fail, the interface is not inserted and
Falseis returnedSee also
See also
- Parameters:
 idx (int)
interface (Optional[QgsRasterInterface])
- Return type:
 bool
- last(self) QgsRasterInterface | None[source]¶
 Returns last interface in the pipe.
- Return type:
 Optional[QgsRasterInterface]
- moveToThread(self, thread: QThread | None)[source]¶
 Moves the pipe to another
thread.This effects all QObject derived interfaces in the pipe, and follows the same behavior as QObject.moveToThread. Specifically, it is permitted to PUSH the pipe from the current thread to another thread, but NOT to PULL a pipe from another thread over to the current thread. Pulling is only supported by first pushsing the pipe from its current thread to a
Nonethread, and then later pulling to the current thread. See QObject documentation for more details.Added in version 3.30.
- Parameters:
 thread (Optional[QThread])
- nuller(self) QgsRasterNuller | None[source]¶
 Returns the raster nuller interface, or
Noneif no raster nuller is present in the pipe.- Return type:
 Optional[QgsRasterNuller]
- projector(self) QgsRasterProjector | None[source]¶
 Returns the projector interface, or
Noneif no projector is present in the pipe.- Return type:
 Optional[QgsRasterProjector]
- static propertyDefinitions() Dict[int, QgsPropertyDefinition][source]¶
 Returns the definitions for data defined properties available for use in raster pipes.
Added in version 3.22.
- Return type:
 Dict[int, QgsPropertyDefinition]
- provider(self) QgsRasterDataProvider | None[source]¶
 Returns the data provider interface, or
Noneif no data provider is present in the pipe.- Return type:
 Optional[QgsRasterDataProvider]
- remove(self, idx: int) bool[source]¶
 Removes and deletes the interface at given index (if possible).
Returns
Trueif the interface was successfully removed.- Parameters:
 idx (int)
- Return type:
 bool
- remove(self, interface: QgsRasterInterface | None) bool[source]
 Removes and deletes interface from pipe (if possible).
Returns
Trueif the interface was successfully removed.- Parameters:
 interface (Optional[QgsRasterInterface])
- Return type:
 bool
- renderer(self) QgsRasterRenderer | None[source]¶
 Returns the raster renderer interface, or
Noneif no raster renderer is present in the pipe.- Return type:
 Optional[QgsRasterRenderer]
- replace(self, idx: int, interface: QgsRasterInterface | None) bool[source]¶
 Attempts to replace the interface at specified index and reconnect the pipe.
If the connection would fail, the interface is not inserted and
Falseis returned.See also
See also
- Parameters:
 idx (int)
interface (Optional[QgsRasterInterface])
- Return type:
 bool
- resampleFilter(self) QgsRasterResampleFilter | None[source]¶
 Returns the resample filter interface, or
Noneif no resample filter is present in the pipe.- Return type:
 Optional[QgsRasterResampleFilter]
- resamplingStage(self) Qgis.RasterResamplingStage[source]¶
 Returns which stage of the pipe should apply resampling
See also
Added in version 3.16.
- Return type:
 
- set(self, interface: QgsRasterInterface | None) bool[source]¶
 Inserts a new known interface in default place or replace interface of the same role if it already exists.
Known interfaces are:
(and their subclasses).
For other interfaces the position of the interface in the pipe must be explicitly specified using the
insert()method.See also
See also
- Parameters:
 interface (Optional[QgsRasterInterface])
- Return type:
 bool
- setDataDefinedProperties(self, collection: QgsPropertyCollection)[source]¶
 Sets the pipe’s property
collection, used for data defined overrides.Any existing properties will be discarded.
See also
See also
Property
Added in version 3.22.
- Parameters:
 collection (QgsPropertyCollection)
- setOn(self, idx: int, on: bool) bool[source]¶
 Set whether the interface at the specified index is enabled.
Returns
Trueon success.- Parameters:
 idx (int)
on (bool)
- Return type:
 bool
- setResamplingStage(self, stage: Qgis.RasterResamplingStage)[source]¶
 Sets which stage of the pipe should apply resampling.
Provider resampling is only supported if provider sets ProviderHintCanPerformProviderResampling in
providerCapabilities().See also
Added in version 3.16.
- Parameters:
 stage (Qgis.RasterResamplingStage)