34 nuller->mNoData = mNoData;
35 nuller->mOutputNoData = mOutputNoData;
36 nuller->mHasOutputNoData = mHasOutputNoData;
42 if ( bandNo > mOutputNoData.
size() )
44 mOutputNoData.
resize( bandNo );
45 mHasOutputNoData.
resize( bandNo );
47 mOutputNoData[bandNo-1] =
noData;
48 mHasOutputNoData[bandNo-1] =
true;
53 if ( bandNo > mNoData.size() )
55 mNoData.resize( bandNo );
57 mNoData[bandNo-1] =
noData;
97 if ( mHasOutputNoData.
value( bandNo - 1 ) )
99 noDataValue = mOutputNoData.
value( bandNo - 1 );
112 for (
int i = 0; i < height; i++ )
114 for (
int j = 0; j < width; j++ )
116 double value = inputBlock->
value( i, j );
118 bool isNoData = inputBlock->
isNoData( i, j );
130 outputBlock->
setValue( i, j, value );
virtual int bandCount() const =0
Get number of bands.
A rectangle specified with double values.
Unknown or unspecified type.
static bool contains(double value, const QgsRasterRangeList &rangeList)
Test if value is within the list of ranges.
bool setValue(int row, int column, double value)
Set value on position.
Raster pipe that deals with null values.
double noDataValue() const
Return no data value.
QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height) override
Read block of data using given extent and size.
QGis::DataType dataType() const
Returns data type.
bool isNoData(int row, int column)
Check if value at position is no data.
bool setIsNoData(int row, int column)
Set no data on pixel.
QgsRasterNuller * clone() const override
Clone itself, create deep copy.
#define QgsDebugMsgLevel(str, level)
double value(int row, int column) const
Read a single value if type of block is numeric.
static bool typeIsColor(QGis::DataType type)
Returns true if data type is color.
virtual QGis::DataType dataType(int bandNo) const =0
Returns data type for the band specified by number.
Base class for processing filters like renderers, reprojector, resampler etc.
void setOutputNoDataValue(int bandNo, double noData)
Set output no data value.
void setNoData(int bandNo, const QgsRasterRangeList &noData)
virtual QgsRectangle extent()
Get the extent of the interface.
bool hasNoDataValue() const
True if the block has no data value.
QgsRasterNuller(QgsRasterInterface *input=nullptr)
QgsRasterRangeList noData(int bandNo) const
DataType
Raster data types.
virtual QgsRasterBlock * block(int bandNo, const QgsRectangle &extent, int width, int height)=0
Read block of data using given extent and size.
QGis::DataType dataType(int bandNo) const override
Returns data type for the band specified by number.
QgsRasterInterface * mInput
int bandCount() const override
Get number of bands.