|
QGIS API Documentation
master-6227475
|
Raster data container. More...
#include <qgsrasterblock.h>
Collaboration diagram for QgsRasterBlock:Public Member Functions | |
| QgsRasterBlock () | |
| QgsRasterBlock (QGis::DataType theDataType, int theWidth, int theHeight) | |
| Constructor which allocates data block in memory. | |
| QgsRasterBlock (QGis::DataType theDataType, int theWidth, int theHeight, double theNoDataValue) | |
| Constructor which allocates data block in memory. | |
| virtual | ~QgsRasterBlock () |
| void | applyNoDataValues (const QgsRasterRangeList &rangeList) |
| char * | bits (int row, int column) |
| Get pointer to data. | |
| char * | bits (size_t index) |
| Get pointer to data. | |
| char * | bits () |
| Get pointer to data. | |
| QRgb | color (int row, int column) const |
| Read a single color. | |
| QRgb | color (size_t index) const |
| Read a single value. | |
| bool | convert (QGis::DataType destDataType) |
| Convert data to different type. | |
| QGis::DataType | dataType () const |
| Returns data type. | |
| int | dataTypeSize () const |
| QgsError | error () const |
| Get error. | |
| bool | hasNoData () const |
| Returns true if thee block may contain no data. | |
| bool | hasNoDataValue () const |
| True if the block has no data value. | |
| QImage | image () const |
| Get image if type is color. | |
| bool | isEmpty () const |
| Returns true if block is empty, i.e. | |
| bool | isNoData (int row, int column) |
| Check if value at position is no data. | |
| bool | isNoData (size_t index) |
| Check if value at position is no data. | |
| bool | isValid () const |
| Returns true if the block is valid (correctly filled with data). | |
| double | noDataValue () const |
| Return no data value. | |
| bool | reset (QGis::DataType theDataType, int theWidth, int theHeight) |
| Reset block. | |
| bool | reset (QGis::DataType theDataType, int theWidth, int theHeight, double theNoDataValue) |
| Reset block. | |
| bool | setColor (int row, int column, QRgb color) |
| Set color on position. | |
| bool | setColor (size_t index, QRgb color) |
| Set color on index (indexed line by line) | |
| void | setError (const QgsError &theError) |
| Set error. | |
| bool | setImage (const QImage *image) |
| set image. | |
| bool | setIsNoData (int row, int column) |
| Set no data on pixel. | |
| bool | setIsNoData (size_t index) |
| Set no data on pixel. | |
| bool | setIsNoData () |
| Set the whole block to no data. | |
| bool | setIsNoDataExcept (const QRect &theExceptRect) |
| Set the whole block to no data except specified rectangle. | |
| void | setValid (bool valid) |
| Mark block as valid or invalid. | |
| bool | setValue (int row, int column, double value) |
| Set value on position. | |
| bool | setValue (size_t index, double value) |
| Set value on index (indexed line by line) | |
| double | value (int row, int column) const |
| Read a single value if type of block is numeric. | |
| double | value (size_t index) const |
| Read a single value if type of block is numeric. | |
Static Public Member Functions | |
| static QString | printValue (double value) |
| Print double value with all necessary significant digits. | |
| static double | readValue (void *data, QGis::DataType type, size_t index) |
| static QRect | subRect (const QgsRectangle &theExtent, int theWidth, int theHeight, const QgsRectangle &theSubExtent) |
| For theExtent and theWidht, theHeight find rectangle covered by subextent. | |
| static bool | typeIsColor (QGis::DataType type) |
| Returns true if data type is color. | |
| static bool | typeIsNumeric (QGis::DataType type) |
| Returns true if data type is numeric. | |
| static int | typeSize (int dataType) |
| static QGis::DataType | typeWithNoDataValue (QGis::DataType dataType, double *noDataValue) |
| For given data type returns wider type and sets no data value. | |
| static QByteArray | valueBytes (QGis::DataType theDataType, double theValue) |
| Get byte array representing a value. | |
| static void | writeValue (void *data, QGis::DataType type, size_t index, double value) |
Private Member Functions | |
| bool | createNoDataBitmap () |
| Allocate no data bitmap. | |
| bool | isNoDataValue (double value) const |
| Test if value is nodata for specific band. | |
Static Private Member Functions | |
| static void * | convert (void *srcData, QGis::DataType srcDataType, QGis::DataType destDataType, size_t size) |
| Convert block of data from one type to another. | |
| static QGis::DataType | dataType (QImage::Format theFormat) |
| static QImage::Format | imageFormat (QGis::DataType theDataType) |
| static bool | isNoDataValue (double value, double noDataValue) |
| Test if value is nodata comparing to noDataValue. | |
Private Attributes | |
| void * | mData |
| QGis::DataType | mDataType |
| QgsError | mError |
| bool | mHasNoDataValue |
| int | mHeight |
| QImage * | mImage |
| char * | mNoDataBitmap |
| size_t | mNoDataBitmapSize |
| int | mNoDataBitmapWidth |
| double | mNoDataValue |
| int | mTypeSize |
| bool | mValid |
| int | mWidth |
Raster data container.
Definition at line 32 of file qgsrasterblock.h.
Definition at line 26 of file qgsrasterblock.cpp.
| QgsRasterBlock::QgsRasterBlock | ( | QGis::DataType | theDataType, |
| int | theWidth, | ||
| int | theHeight | ||
| ) |
| QgsRasterBlock::QgsRasterBlock | ( | QGis::DataType | theDataType, |
| int | theWidth, | ||
| int | theHeight, | ||
| double | theNoDataValue | ||
| ) |
Constructor which allocates data block in memory.
| theDataType | raster data type |
| theWidth | width of data matrix |
| theHeight | height of data matrix |
| theNoDataValue | the value representing no data (NULL) |
Definition at line 59 of file qgsrasterblock.cpp.
References mDataType, mHeight, mNoDataValue, mWidth, and reset().
| QgsRasterBlock::~QgsRasterBlock | ( | ) | [virtual] |
Definition at line 76 of file qgsrasterblock.cpp.
References mData, mImage, mNoDataBitmap, QgsDebugMsg, and qgsFree().
| void QgsRasterBlock::applyNoDataValues | ( | const QgsRasterRangeList & | rangeList | ) |
Definition at line 687 of file qgsrasterblock.cpp.
References QgsRasterRange::contains(), mHeight, mWidth, setIsNoData(), size, and value().
Referenced by QgsRasterDataProvider::block().
| char * QgsRasterBlock::bits | ( | int | row, |
| int | column | ||
| ) |
Get pointer to data.
| row | row index |
| column | column index |
Definition at line 633 of file qgsrasterblock.cpp.
References bits(), and mWidth.
Referenced by QgsPalettedRasterRenderer::block(), QgsRasterProjector::block(), and QgsRasterDataProvider::block().
| char * QgsRasterBlock::bits | ( | size_t | index | ) |
Get pointer to data.
| index | data matrix index |
Definition at line 613 of file qgsrasterblock.cpp.
References mData, mHeight, mImage, mTypeSize, mWidth, and QgsDebugMsg.
| char * QgsRasterBlock::bits | ( | ) |
Get pointer to data.
Definition at line 638 of file qgsrasterblock.cpp.
Referenced by bits(), and setColor().
| QRgb QgsRasterBlock::color | ( | int | row, |
| int | column | ||
| ) | const |
Read a single color.
| row | row index |
| column | column index |
Definition at line 300 of file qgsrasterblock.cpp.
References mImage.
Referenced by QgsSingleBandColorDataRenderer::block(), QgsBrightnessContrastFilter::block(), QgsHueSaturationFilter::block(), color(), setColor(), and QgsRasterFileWriter::writeImageRaster().
| QRgb QgsRasterBlock::color | ( | size_t | index | ) | const |
Read a single value.
| index | data matrix index |
Definition at line 293 of file qgsrasterblock.cpp.
| bool QgsRasterBlock::convert | ( | QGis::DataType | destDataType | ) |
Convert data to different type.
| destDataType | dest data type |
Definition at line 652 of file qgsrasterblock.cpp.
References image(), imageFormat(), isEmpty(), mData, mDataType, mHeight, mImage, mTypeSize, mWidth, QgsDebugMsg, qgsFree(), typeIsColor(), typeIsNumeric(), and typeSize().
Referenced by QgsSingleBandColorDataRenderer::block().
| void * QgsRasterBlock::convert | ( | void * | srcData, |
| QGis::DataType | srcDataType, | ||
| QGis::DataType | destDataType, | ||
| size_t | size | ||
| ) | [static, private] |
Convert block of data from one type to another.
Original block memory is not release.
| srcData | source data |
| srcDataType | source data type |
| destDataType | dest data type |
| size | block size (width * height) |
Definition at line 769 of file qgsrasterblock.cpp.
References qgsMalloc(), readValue(), size, typeSize(), value(), and writeValue().
| bool QgsRasterBlock::createNoDataBitmap | ( | ) | [private] |
Allocate no data bitmap.
Definition at line 832 of file qgsrasterblock.cpp.
References mHeight, mNoDataBitmap, mNoDataBitmapSize, mNoDataBitmapWidth, mWidth, QgsDebugMsg, and qgsMalloc().
Referenced by setIsNoData(), and setIsNoDataExcept().
| QGis::DataType QgsRasterBlock::dataType | ( | ) | const [inline] |
Returns data type.
Definition at line 137 of file qgsrasterblock.h.
Referenced by QgsRasterNuller::block(), QgsRasterProjector::block(), and setImage().
| QGis::DataType QgsRasterBlock::dataType | ( | QImage::Format | theFormat | ) | [static, private] |
Definition at line 162 of file qgsrasterblock.cpp.
References QGis::ARGB32, QGis::ARGB32_Premultiplied, and QGis::UnknownDataType.
| int QgsRasterBlock::dataTypeSize | ( | ) | const [inline] |
Definition at line 125 of file qgsrasterblock.h.
Referenced by setIsNoData(), and setIsNoDataExcept().
| QgsError QgsRasterBlock::error | ( | ) | const [inline] |
Get error.
Definition at line 286 of file qgsrasterblock.h.
| bool QgsRasterBlock::hasNoData | ( | ) | const |
Returns true if thee block may contain no data.
It does not guarantee that it really contains any no data. It can be used to speed up processing. Not the difference between this method and hasNoDataValue().
Definition at line 270 of file qgsrasterblock.cpp.
References mHasNoDataValue, and mNoDataBitmap.
Referenced by QgsRasterProjector::block().
| bool QgsRasterBlock::hasNoDataValue | ( | ) | const [inline] |
True if the block has no data value.
Definition at line 144 of file qgsrasterblock.h.
Referenced by QgsRasterNuller::block(), and QgsRasterProjector::block().
| QImage QgsRasterBlock::image | ( | ) | const |
Get image if type is color.
Definition at line 706 of file qgsrasterblock.cpp.
References mImage.
Referenced by QgsRasterResampleFilter::block(), convert(), and QgsRasterDrawer::draw().
| QImage::Format QgsRasterBlock::imageFormat | ( | QGis::DataType | theDataType | ) | [static, private] |
Definition at line 149 of file qgsrasterblock.cpp.
References QGis::ARGB32, and QGis::ARGB32_Premultiplied.
| bool QgsRasterBlock::isEmpty | ( | ) | const |
Returns true if block is empty, i.e.
its size is 0 (zero rows or cols). This method does not return true if size is not zero and all values are 'no data' (null).
Definition at line 175 of file qgsrasterblock.cpp.
References mData, mDataType, mHeight, mImage, mWidth, QgsDebugMsg, typeIsColor(), and typeIsNumeric().
Referenced by QgsPalettedRasterRenderer::block(), QgsSingleBandColorDataRenderer::block(), QgsSingleBandPseudoColorRenderer::block(), QgsBrightnessContrastFilter::block(), QgsSingleBandGrayRenderer::block(), QgsRasterResampleFilter::block(), QgsHueSaturationFilter::block(), QgsRasterProjector::block(), QgsRasterDataProvider::block(), and convert().
| bool QgsRasterBlock::isNoData | ( | int | row, |
| int | column | ||
| ) |
Check if value at position is no data.
| row | row index |
| column | column index |
Definition at line 337 of file qgsrasterblock.cpp.
References mWidth.
Referenced by QgsRasterInterface::bandStatistics(), QgsSingleBandPseudoColorRenderer::block(), QgsPalettedRasterRenderer::block(), QgsMultiBandColorRenderer::block(), QgsSingleBandGrayRenderer::block(), QgsRasterNuller::block(), QgsRasterProjector::block(), and QgsRasterInterface::histogram().
| bool QgsRasterBlock::isNoData | ( | size_t | index | ) |
Check if value at position is no data.
| index | data matrix index |
Definition at line 307 of file qgsrasterblock.cpp.
References isNoDataValue(), mData, mDataType, mHasNoDataValue, mHeight, mNoDataBitmap, mNoDataBitmapWidth, mWidth, QgsDebugMsg, readValue(), and value().
| bool QgsRasterBlock::isNoDataValue | ( | double | value, |
| double | noDataValue | ||
| ) | [static, private] |
Test if value is nodata comparing to noDataValue.
| value | tested value |
| noDataValue | no data value |
Definition at line 275 of file qgsrasterblock.cpp.
References qgsDoubleNear().
Referenced by isNoData().
| bool QgsRasterBlock::isNoDataValue | ( | double | value | ) | const [inline, private] |
Test if value is nodata for specific band.
| value | tested value |
Definition at line 454 of file qgsrasterblock.h.
References mNoDataValue, and qgsDoubleNear().
| bool QgsRasterBlock::isValid | ( | ) | const [inline] |
Returns true if the block is valid (correctly filled with data).
An empty block may still be valid (if zero size block was requested). If the block is not valid, error may be retrieved by error() method.
Definition at line 77 of file qgsrasterblock.h.
Referenced by QgsRasterChecker::runTest().
| double QgsRasterBlock::noDataValue | ( | ) | const [inline] |
Return no data value.
If the block does not have a no data value the returned value is undefined.
Definition at line 155 of file qgsrasterblock.h.
Referenced by QgsRasterNuller::block(), and QgsRasterProjector::block().
| QString QgsRasterBlock::printValue | ( | double | value | ) | [static] |
Print double value with all necessary significant digits.
It is ensured that conversion back to double gives the same number.
| value | the value to be printed |
Definition at line 730 of file qgsrasterblock.cpp.
References QgsDebugMsg, and value().
Referenced by QgsRasterLayerSaveAsDialog::addNoDataRow(), QgsMapToolIdentify::identifyRasterLayer(), QgsRasterLayerSaveAsDialog::setOutputExtent(), and QgsRasterTransparency::writeXML().
| double QgsRasterBlock::readValue | ( | void * | data, |
| QGis::DataType | type, | ||
| size_t | index | ||
| ) | [inline, static] |
Definition at line 373 of file qgsrasterblock.h.
References QGis::Byte, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, QgsDebugMsg, QGis::UInt16, and QGis::UInt32.
Referenced by convert(), isNoData(), and value().
| bool QgsRasterBlock::reset | ( | QGis::DataType | theDataType, |
| int | theWidth, | ||
| int | theHeight | ||
| ) |
Reset block.
| theDataType | raster data type |
| theWidth | width of data matrix |
| theHeight | height of data matrix |
Definition at line 84 of file qgsrasterblock.cpp.
References mHasNoDataValue, and QgsDebugMsg.
Referenced by QgsPalettedRasterRenderer::block(), QgsSingleBandPseudoColorRenderer::block(), QgsSingleBandColorDataRenderer::block(), QgsMultiBandColorRenderer::block(), QgsBrightnessContrastFilter::block(), QgsSingleBandGrayRenderer::block(), QgsRasterResampleFilter::block(), QgsHueSaturationFilter::block(), and QgsRasterBlock().
| bool QgsRasterBlock::reset | ( | QGis::DataType | theDataType, |
| int | theWidth, | ||
| int | theHeight, | ||
| double | theNoDataValue | ||
| ) |
Reset block.
| theDataType | raster data type |
| theWidth | width of data matrix |
| theHeight | height of data matrix |
| theNoDataValue | the value representing no data (NULL) |
Definition at line 96 of file qgsrasterblock.cpp.
References imageFormat(), mData, mDataType, mHasNoDataValue, mHeight, mImage, mNoDataBitmap, mNoDataValue, mTypeSize, mValid, mWidth, QgsDebugMsg, qgsFree(), qgsMalloc(), typeIsColor(), typeIsNumeric(), typeSize(), and QGis::UnknownDataType.
| bool QgsRasterBlock::setColor | ( | int | row, |
| int | column, | ||
| QRgb | color | ||
| ) |
Set color on position.
| row | row index |
| column | column index |
| color | the color to be set, QRgb value |
Definition at line 363 of file qgsrasterblock.cpp.
References mWidth.
Referenced by QgsSingleBandColorDataRenderer::block(), QgsSingleBandPseudoColorRenderer::block(), QgsMultiBandColorRenderer::block(), QgsBrightnessContrastFilter::block(), QgsSingleBandGrayRenderer::block(), and QgsHueSaturationFilter::block().
| bool QgsRasterBlock::setColor | ( | size_t | index, |
| QRgb | color | ||
| ) |
Set color on index (indexed line by line)
| index | data matrix index |
| color | the color to be set, QRgb value |
Definition at line 368 of file qgsrasterblock.cpp.
References bits(), color(), mImage, and QgsDebugMsg.
| void QgsRasterBlock::setError | ( | const QgsError & | theError | ) | [inline] |
Set error.
Definition at line 289 of file qgsrasterblock.h.
| bool QgsRasterBlock::setImage | ( | const QImage * | image | ) |
set image.
| image | image |
Definition at line 715 of file qgsrasterblock.cpp.
References dataType(), mData, mDataType, mHeight, mImage, mNoDataValue, mTypeSize, mWidth, qgsFree(), and typeSize().
Referenced by QgsRasterResampleFilter::block().
| bool QgsRasterBlock::setIsNoData | ( | int | row, |
| int | column | ||
| ) |
Set no data on pixel.
| row | row index |
| column | column index |
Definition at line 388 of file qgsrasterblock.cpp.
References mWidth, and setIsNoData().
Referenced by QgsRasterNuller::block(), and QgsRasterDataProvider::block().
| bool QgsRasterBlock::setIsNoData | ( | size_t | index | ) |
Set no data on pixel.
| index | data matrix index |
Definition at line 393 of file qgsrasterblock.cpp.
References createNoDataBitmap(), mHasNoDataValue, mNoDataBitmap, mNoDataBitmapWidth, mNoDataValue, mWidth, and setValue().
| bool QgsRasterBlock::setIsNoData | ( | ) |
Set the whole block to no data.
Definition at line 420 of file qgsrasterblock.cpp.
References createNoDataBitmap(), dataTypeSize(), mData, mDataType, mHasNoDataValue, mHeight, mImage, mNoDataBitmap, mNoDataBitmapSize, mNoDataValue, mWidth, QgsDebugMsg, typeIsNumeric(), typeSize(), and valueBytes().
Referenced by applyNoDataValues(), and setIsNoData().
| bool QgsRasterBlock::setIsNoDataExcept | ( | const QRect & | theExceptRect | ) |
Set the whole block to no data except specified rectangle.
Definition at line 472 of file qgsrasterblock.cpp.
References createNoDataBitmap(), dataTypeSize(), mData, mDataType, mHasNoDataValue, mHeight, mImage, mNoDataBitmap, mNoDataBitmapWidth, mNoDataValue, mWidth, QgsDebugMsg, typeIsNumeric(), typeSize(), and valueBytes().
| void QgsRasterBlock::setValid | ( | bool | valid | ) | [inline] |
Mark block as valid or invalid.
Definition at line 80 of file qgsrasterblock.h.
| bool QgsRasterBlock::setValue | ( | int | row, |
| int | column, | ||
| double | value | ||
| ) |
Set value on position.
| row | row index |
| column | column index |
| value | the value to be set |
Definition at line 358 of file qgsrasterblock.cpp.
References mWidth.
Referenced by QgsRasterNuller::block(), setIsNoData(), and QgsRasterFileWriter::writeImageRaster().
| bool QgsRasterBlock::setValue | ( | size_t | index, |
| double | value | ||
| ) |
Set value on index (indexed line by line)
| index | data matrix index |
| value | the value to be set |
Definition at line 342 of file qgsrasterblock.cpp.
References mData, mDataType, mHeight, mWidth, QgsDebugMsg, and writeValue().
| QRect QgsRasterBlock::subRect | ( | const QgsRectangle & | theExtent, |
| int | theWidth, | ||
| int | theHeight, | ||
| const QgsRectangle & | theSubExtent | ||
| ) | [static] |
For theExtent and theWidht, theHeight find rectangle covered by subextent.
The output rect has x oriented from left to right and y from top to bottom (upper-left to lower-right orientation).
| theExtent | extent, usually the larger |
| theWidth | numbers of columns in theExtent |
| theHeight | numbers of rows in theExtent |
| theSubExtent | extent, usually smaller than theExtent |
Definition at line 847 of file qgsrasterblock.cpp.
References QgsRectangle::height(), QgsRectangle::width(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
| bool QgsRasterBlock::typeIsColor | ( | QGis::DataType | type | ) | [static] |
Returns true if data type is color.
Definition at line 212 of file qgsrasterblock.cpp.
References QGis::ARGB32, QGis::ARGB32_Premultiplied, QGis::Byte, QGis::CFloat32, QGis::CFloat64, QGis::CInt16, QGis::CInt32, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, QGis::UInt16, QGis::UInt32, and QGis::UnknownDataType.
Referenced by QgsRasterNuller::block(), convert(), isEmpty(), reset(), and QgsRasterFileWriter::writeRaster().
| bool QgsRasterBlock::typeIsNumeric | ( | QGis::DataType | type | ) | [static] |
Returns true if data type is numeric.
Definition at line 187 of file qgsrasterblock.cpp.
References QGis::ARGB32, QGis::ARGB32_Premultiplied, QGis::Byte, QGis::CFloat32, QGis::CFloat64, QGis::CInt16, QGis::CInt32, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, QGis::UInt16, QGis::UInt32, and QGis::UnknownDataType.
Referenced by convert(), isEmpty(), reset(), QgsRasterRenderer::setInput(), setIsNoData(), and setIsNoDataExcept().
| static int QgsRasterBlock::typeSize | ( | int | dataType | ) | [inline, static] |
Definition at line 89 of file qgsrasterblock.h.
References QGis::ARGB32, QGis::ARGB32_Premultiplied, QGis::Byte, QGis::CFloat32, QGis::CFloat64, QGis::CInt16, QGis::CInt32, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, QGis::UInt16, and QGis::UInt32.
Referenced by QgsRasterProjector::block(), convert(), QgsRasterInterface::dataTypeSize(), reset(), QgsRasterLayer::setDefaultContrastEnhancement(), setImage(), setIsNoData(), setIsNoDataExcept(), valueBytes(), and QgsRasterFileWriter::writeDataRaster().
| QGis::DataType QgsRasterBlock::typeWithNoDataValue | ( | QGis::DataType | dataType, |
| double * | noDataValue | ||
| ) | [static] |
For given data type returns wider type and sets no data value.
Definition at line 237 of file qgsrasterblock.cpp.
References QGis::Byte, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, MathUtils::max(), QgsDebugMsg, QGis::UInt16, QGis::UInt32, and QGis::UnknownDataType.
Referenced by QgsRasterFileWriter::writeDataRaster().
| double QgsRasterBlock::value | ( | int | row, |
| int | column | ||
| ) | const |
Read a single value if type of block is numeric.
If type is color, returned value is undefined.
| row | row index |
| column | column index |
Definition at line 288 of file qgsrasterblock.cpp.
References mWidth.
Referenced by applyNoDataValues(), QgsRasterInterface::bandStatistics(), QgsPalettedRasterRenderer::block(), QgsSingleBandPseudoColorRenderer::block(), QgsMultiBandColorRenderer::block(), QgsSingleBandGrayRenderer::block(), QgsRasterNuller::block(), convert(), QgsRasterInterface::histogram(), QgsRasterDataProvider::identify(), isNoData(), printValue(), QgsRasterChecker::runTest(), and writeValue().
| double QgsRasterBlock::value | ( | size_t | index | ) | const [inline] |
Read a single value if type of block is numeric.
If type is color, returned value is undefined.
| index | data matrix index |
Definition at line 444 of file qgsrasterblock.h.
References mData, mDataType, QgsDebugMsg, and readValue().
| QByteArray QgsRasterBlock::valueBytes | ( | QGis::DataType | theDataType, |
| double | theValue | ||
| ) | [static] |
Get byte array representing a value.
| theDataType | data type |
| theValue | value |
Definition at line 783 of file qgsrasterblock.cpp.
References QGis::Byte, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, QgsDebugMsg, size, typeSize(), QGis::UInt16, and QGis::UInt32.
Referenced by setIsNoData(), and setIsNoDataExcept().
| void QgsRasterBlock::writeValue | ( | void * | data, |
| QGis::DataType | type, | ||
| size_t | index, | ||
| double | value | ||
| ) | [inline, static] |
Definition at line 411 of file qgsrasterblock.h.
References QGis::Byte, QGis::Float32, QGis::Float64, QGis::Int16, QGis::Int32, QgsDebugMsg, QGis::UInt16, QGis::UInt32, and value().
Referenced by convert(), and setValue().
void* QgsRasterBlock::mData [private] |
Definition at line 353 of file qgsrasterblock.h.
Referenced by bits(), convert(), isEmpty(), isNoData(), reset(), setImage(), setIsNoData(), setIsNoDataExcept(), setValue(), value(), and ~QgsRasterBlock().
QGis::DataType QgsRasterBlock::mDataType [private] |
Definition at line 334 of file qgsrasterblock.h.
Referenced by convert(), isEmpty(), isNoData(), QgsRasterBlock(), reset(), setImage(), setIsNoData(), setIsNoDataExcept(), setValue(), and value().
QgsError QgsRasterBlock::mError [private] |
Definition at line 370 of file qgsrasterblock.h.
bool QgsRasterBlock::mHasNoDataValue [private] |
Definition at line 346 of file qgsrasterblock.h.
Referenced by hasNoData(), isNoData(), reset(), setIsNoData(), and setIsNoDataExcept().
int QgsRasterBlock::mHeight [private] |
Definition at line 343 of file qgsrasterblock.h.
Referenced by applyNoDataValues(), bits(), convert(), createNoDataBitmap(), isEmpty(), isNoData(), QgsRasterBlock(), reset(), setImage(), setIsNoData(), setIsNoDataExcept(), and setValue().
QImage* QgsRasterBlock::mImage [private] |
Definition at line 356 of file qgsrasterblock.h.
Referenced by bits(), color(), convert(), image(), isEmpty(), reset(), setColor(), setImage(), setIsNoData(), setIsNoDataExcept(), and ~QgsRasterBlock().
char* QgsRasterBlock::mNoDataBitmap [private] |
Definition at line 361 of file qgsrasterblock.h.
Referenced by createNoDataBitmap(), hasNoData(), isNoData(), reset(), setIsNoData(), setIsNoDataExcept(), and ~QgsRasterBlock().
size_t QgsRasterBlock::mNoDataBitmapSize [private] |
Definition at line 367 of file qgsrasterblock.h.
Referenced by createNoDataBitmap(), and setIsNoData().
int QgsRasterBlock::mNoDataBitmapWidth [private] |
Definition at line 364 of file qgsrasterblock.h.
Referenced by createNoDataBitmap(), isNoData(), setIsNoData(), and setIsNoDataExcept().
double QgsRasterBlock::mNoDataValue [private] |
Definition at line 349 of file qgsrasterblock.h.
Referenced by isNoDataValue(), QgsRasterBlock(), reset(), setImage(), setIsNoData(), and setIsNoDataExcept().
int QgsRasterBlock::mTypeSize [private] |
Definition at line 337 of file qgsrasterblock.h.
Referenced by bits(), convert(), reset(), and setImage().
bool QgsRasterBlock::mValid [private] |
Definition at line 331 of file qgsrasterblock.h.
Referenced by reset().
int QgsRasterBlock::mWidth [private] |
Definition at line 340 of file qgsrasterblock.h.
Referenced by applyNoDataValues(), bits(), color(), convert(), createNoDataBitmap(), isEmpty(), isNoData(), QgsRasterBlock(), reset(), setColor(), setImage(), setIsNoData(), setIsNoDataExcept(), setValue(), and value().