QGIS API Documentation  master-59fd5e0
QgsRasterNuller Class Reference

Raster pipe that deals with null values. More...

#include <qgsrasternuller.h>

+ Inheritance diagram for QgsRasterNuller:
+ Collaboration diagram for QgsRasterNuller:

List of all members.

Classes

struct  NoData

Public Member Functions

 QgsRasterNuller (QgsRasterInterface *input=0)
 ~QgsRasterNuller ()
int bandCount () const
 Get number of bands.
QgsRasterBlockblock (int bandNo, const QgsRectangle &extent, int width, int height)
 Read block of data using given extent and size.
QgsRasterInterfaceclone () 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< QgsRasterRangeListmNoData
QVector< double > mOutputNoData

Detailed Description

Raster pipe that deals with null values.

Definition at line 30 of file qgsrasternuller.h.


Constructor & Destructor Documentation

Definition at line 21 of file qgsrasternuller.cpp.

Referenced by clone().

Definition at line 26 of file qgsrasternuller.cpp.


Member Function Documentation

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.

Parameters:
bandNoband number
extentextent of block
widthpixel width of block
heightpixel 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().

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]
void QgsRasterNuller::setNoData ( int  bandNo,
QgsRasterRangeList  noData 
)

Definition at line 51 of file qgsrasternuller.cpp.

References mNoData, and noData().

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().


Member Data Documentation

QVector<bool> QgsRasterNuller::mHasOutputNoData [private]

Definition at line 62 of file qgsrasternuller.h.

Referenced by block(), clone(), and setOutputNoDataValue().

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines