|
QGIS API Documentation
master-59fd5e0
|
Raster pipe that deals with null values. More...
#include <qgsrasternuller.h>
Inheritance diagram for QgsRasterNuller:
Collaboration diagram for QgsRasterNuller:Classes | |
| struct | NoData |
Public Member Functions | |
| QgsRasterNuller (QgsRasterInterface *input=0) | |
| ~QgsRasterNuller () | |
| int | bandCount () const |
| Get number of bands. | |
| QgsRasterBlock * | block (int bandNo, const QgsRectangle &extent, int width, int height) |
| Read block of data using given extent and size. | |
| QgsRasterInterface * | clone () const |
| Clone itself, create deep copy. | |
| QGis::DataType | dataType (int bandNo) const |
| Returns data type for the band specified by number. | |
| QgsRasterRangeList | noData (int bandNo) const |
| void | setNoData (int bandNo, QgsRasterRangeList noData) |
| void | setOutputNoDataValue (int bandNo, double noData) |
| Set output no data value. | |
Private Attributes | |
| QVector< bool > | mHasOutputNoData |
| QVector< QgsRasterRangeList > | mNoData |
| QVector< double > | mOutputNoData |
Raster pipe that deals with null values.
Definition at line 30 of file qgsrasternuller.h.
| QgsRasterNuller::QgsRasterNuller | ( | QgsRasterInterface * | input = 0 | ) |
Definition at line 21 of file qgsrasternuller.cpp.
Referenced by clone().
Definition at line 26 of file qgsrasternuller.cpp.
| int QgsRasterNuller::bandCount | ( | ) | const [virtual] |
Get number of bands.
Implements QgsRasterInterface.
Definition at line 60 of file qgsrasternuller.cpp.
References QgsRasterInterface::bandCount(), and QgsRasterInterface::mInput.
| QgsRasterBlock * QgsRasterNuller::block | ( | int | bandNo, |
| const QgsRectangle & | extent, | ||
| int | width, | ||
| int | height | ||
| ) | [virtual] |
Read block of data using given extent and size.
Returns pointer to data. Caller is responsible to free the memory returned.
| bandNo | band number |
| extent | extent of block |
| width | pixel width of block |
| height | pixel height of block |
Implements QgsRasterInterface.
Definition at line 72 of file qgsrasternuller.cpp.
References QgsRasterInterface::block(), QgsRasterRange::contains(), QgsRasterBlock::dataType(), QgsRasterBlock::hasNoDataValue(), QgsRasterBlock::isNoData(), mHasOutputNoData, QgsRasterInterface::mInput, mNoData, mOutputNoData, QgsRasterBlock::noDataValue(), QgsDebugMsg, QgsRasterBlock::setIsNoData(), QgsRasterBlock::setValue(), QgsRasterBlock::typeIsColor(), and QgsRasterBlock::value().
| QgsRasterInterface * QgsRasterNuller::clone | ( | ) | const [virtual] |
Clone itself, create deep copy.
Implements QgsRasterInterface.
Definition at line 30 of file qgsrasternuller.cpp.
References mHasOutputNoData, mNoData, mOutputNoData, QgsDebugMsg, and QgsRasterNuller().
| QGis::DataType QgsRasterNuller::dataType | ( | int | bandNo | ) | const [virtual] |
Returns data type for the band specified by number.
Implements QgsRasterInterface.
Definition at line 66 of file qgsrasternuller.cpp.
References QgsRasterInterface::dataType(), QgsRasterInterface::mInput, and QGis::UnknownDataType.
| QgsRasterRangeList QgsRasterNuller::noData | ( | int | bandNo | ) | const [inline] |
Definition at line 52 of file qgsrasternuller.h.
Referenced by setNoData(), setOutputNoDataValue(), and QgsRasterFileWriter::writeDataRaster().
| void QgsRasterNuller::setNoData | ( | int | bandNo, |
| QgsRasterRangeList | noData | ||
| ) |
Definition at line 51 of file qgsrasternuller.cpp.
| void QgsRasterNuller::setOutputNoDataValue | ( | int | bandNo, |
| double | noData | ||
| ) |
Set output no data value.
Definition at line 40 of file qgsrasternuller.cpp.
References mHasOutputNoData, mOutputNoData, and noData().
Referenced by QgsRasterFileWriter::writeDataRaster().
QVector<bool> QgsRasterNuller::mHasOutputNoData [private] |
Definition at line 62 of file qgsrasternuller.h.
Referenced by block(), clone(), and setOutputNoDataValue().
QVector< QgsRasterRangeList > QgsRasterNuller::mNoData [private] |
Definition at line 59 of file qgsrasternuller.h.
Referenced by block(), clone(), and setNoData().
QVector<double> QgsRasterNuller::mOutputNoData [private] |
Definition at line 61 of file qgsrasternuller.h.
Referenced by block(), clone(), and setOutputNoDataValue().