QGIS API Documentation  master-3f58142
QgsRasterResampleFilter Class Reference

Resample filter pipe for rasters. More...

#include <qgsrasterresamplefilter.h>

+ Inheritance diagram for QgsRasterResampleFilter:
+ Collaboration diagram for QgsRasterResampleFilter:

List of all members.

Public Member Functions

 QgsRasterResampleFilter (QgsRasterInterface *input=0)
 ~QgsRasterResampleFilter ()
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.
double maxOversampling () const
void readXML (const QDomElement &filterElem)
 Sets base class members from xml.
bool setInput (QgsRasterInterface *input)
 Set input.
void setMaxOversampling (double os)
void setZoomedInResampler (QgsRasterResampler *r)
 Set resampler for zoomed in scales.
void setZoomedOutResampler (QgsRasterResampler *r)
 Set resampler for zoomed out scales.
void writeXML (QDomDocument &doc, QDomElement &parentElem) const
 Write base class members to xml.
const QgsRasterResamplerzoomedInResampler () const
const QgsRasterResamplerzoomedOutResampler () const

Protected Attributes

double mMaxOversampling
 Maximum boundary for oversampling (to avoid too much data traffic).
QgsRasterResamplermZoomedInResampler
 Resampler used if screen resolution is higher than raster resolution (zoomed in).
QgsRasterResamplermZoomedOutResampler
 Resampler used if raster resolution is higher than raster resolution (zoomed out).

Detailed Description

Resample filter pipe for rasters.

Definition at line 31 of file qgsrasterresamplefilter.h.


Constructor & Destructor Documentation


Member Function Documentation

int QgsRasterResampleFilter::bandCount ( ) const [virtual]

Get number of bands.

Implements QgsRasterInterface.

Definition at line 64 of file qgsrasterresamplefilter.cpp.

References QgsRasterInterface::bandCount(), QgsRasterInterface::mInput, and QgsRasterInterface::mOn.

QgsRasterBlock * QgsRasterResampleFilter::block ( int  bandNo,
const QgsRectangle extent,
int  width,
int  height 
) [virtual]
QGis::DataType QgsRasterResampleFilter::dataType ( int  bandNo) const [virtual]

Returns data type for the band specified by number.

Implements QgsRasterInterface.

Definition at line 73 of file qgsrasterresamplefilter.cpp.

References QGis::ARGB32_Premultiplied, QgsRasterInterface::dataType(), QgsRasterInterface::mInput, QgsRasterInterface::mOn, and QGis::UnknownDataType.

double QgsRasterResampleFilter::maxOversampling ( ) const [inline]

Definition at line 56 of file qgsrasterresamplefilter.h.

void QgsRasterResampleFilter::readXML ( const QDomElement &  filterElem) [virtual]

Sets base class members from xml.

Usually called from create() methods of subclasses

Reimplemented from QgsRasterInterface.

Definition at line 245 of file qgsrasterresamplefilter.cpp.

References mMaxOversampling, mZoomedInResampler, and mZoomedOutResampler.

Referenced by QgsRasterLayer::readSymbology().

void QgsRasterResampleFilter::setMaxOversampling ( double  os) [inline]

Definition at line 55 of file qgsrasterresamplefilter.h.

Referenced by clone().

Set resampler for zoomed in scales.

Takes ownership of the object

Definition at line 119 of file qgsrasterresamplefilter.cpp.

References mZoomedInResampler.

Referenced by clone().

Set resampler for zoomed out scales.

Takes ownership of the object

Definition at line 125 of file qgsrasterresamplefilter.cpp.

References mZoomedOutResampler.

Referenced by clone().

void QgsRasterResampleFilter::writeXML ( QDomDocument &  doc,
QDomElement &  parentElem 
) const [virtual]

Write base class members to xml.

Reimplemented from QgsRasterInterface.

Definition at line 224 of file qgsrasterresamplefilter.cpp.

References mMaxOversampling, mZoomedInResampler, mZoomedOutResampler, and QgsRasterResampler::type().

Definition at line 49 of file qgsrasterresamplefilter.h.

Definition at line 53 of file qgsrasterresamplefilter.h.


Member Data Documentation

Maximum boundary for oversampling (to avoid too much data traffic).

Default: 2.0

Definition at line 70 of file qgsrasterresamplefilter.h.

Referenced by block(), clone(), readXML(), and writeXML().

Resampler used if screen resolution is higher than raster resolution (zoomed in).

0 means no resampling (nearest neighbour)

Definition at line 65 of file qgsrasterresamplefilter.h.

Referenced by block(), clone(), readXML(), setZoomedInResampler(), writeXML(), and ~QgsRasterResampleFilter().

Resampler used if raster resolution is higher than raster resolution (zoomed out).

0 mean no resampling (nearest neighbour)

Definition at line 67 of file qgsrasterresamplefilter.h.

Referenced by block(), clone(), readXML(), setZoomedOutResampler(), writeXML(), and ~QgsRasterResampleFilter().


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