18 #ifndef QGSRASTERINTERFACE_H
19 #define QGSRASTERINTERFACE_H
23 #include <QCoreApplication>
47 BuildPyramids = 1 << 4,
49 IdentifyValue = 1 << 6,
50 IdentifyText = 1 << 7,
51 IdentifyHtml = 1 << 8,
52 IdentifyFeature = 1 << 9,
71 QString capabilitiesString()
const;
89 virtual int bandCount()
const = 0;
92 virtual int xBlockSize()
const {
if ( mInput )
return mInput->xBlockSize();
else return 0; }
93 virtual int yBlockSize()
const {
if ( mInput )
return mInput->yBlockSize();
else return 0; }
96 virtual int xSize()
const {
if ( mInput )
return mInput->xSize();
else return 0; }
97 virtual int ySize()
const {
if ( mInput )
return mInput->ySize();
else return 0; }
102 return tr(
"Band" ) +
QString(
" %1" ) .
arg( theBandNumber, 1 + (
int ) log10((
float ) bandCount() ), 10,
QChar(
'0' ) );
123 virtual bool on()
const {
return mOn; }
126 virtual void setOn(
bool on ) { mOn = on; }
135 return mInput ? mInput->srcInput() :
this;
140 return mInput ? mInput->srcInput() :
this;
153 int theSampleSize = 0 );
158 virtual bool hasStatistics(
int theBandNo,
161 int theSampleSize = 0 );
176 double theMinimum = std::numeric_limits<double>::quiet_NaN(),
177 double theMaximum = std::numeric_limits<double>::quiet_NaN(),
179 int theSampleSize = 0,
180 bool theIncludeOutOfRange =
false );
185 virtual bool hasHistogram(
int theBandNo,
187 double theMinimum = std::numeric_limits<double>::quiet_NaN(),
188 double theMaximum = std::numeric_limits<double>::quiet_NaN(),
190 int theSampleSize = 0,
191 bool theIncludeOutOfRange =
false );
202 virtual void cumulativeCut(
int theBandNo,
203 double theLowerCount,
204 double theUpperCount,
205 double &theLowerValue,
206 double &theUpperValue,
208 int theSampleSize = 0 );
233 double theMinimum = std::numeric_limits<double>::quiet_NaN(),
234 double theMaximum = std::numeric_limits<double>::quiet_NaN(),
236 int theSampleSize = 0,
237 bool theIncludeOutOfRange =
false );
243 int theBinCount = 0 );
A rectangle specified with double values.
virtual int xBlockSize() const
Get block size.
virtual void readXML(const QDomElement &filterElem)
Sets base class members from xml.
virtual const QgsRasterInterface * srcInput() const
Get source / raw input, the first in pipe, usually provider.
virtual int yBlockSize() const
Capability
If you add to this, please also add to capabilitiesString()
virtual QgsRasterInterface * input() const
Current input.
virtual int ySize() const
The RasterBandStats struct is a container for statistics about a single raster band.
virtual void setOn(bool on)
Set on/off.
QList< QgsRasterHistogram > mHistograms
List of cached histograms, all bands mixed.
virtual void writeXML(QDomDocument &doc, QDomElement &parentElem) const
Write base class members to xml.
virtual QString generateBandName(int theBandNumber) const
helper function to create zero padded band names
static int typeSize(int dataType)
Base class for processing filters like renderers, reprojector, resampler etc.
virtual QgsRasterInterface * srcInput()
virtual int capabilities() const
Returns a bitmask containing the supported capabilities.
virtual bool setInput(QgsRasterInterface *input)
Set input.
virtual QgsRectangle extent()
Get the extent of the interface.
virtual int xSize() const
Get raster size.
virtual QGis::DataType srcDataType(int bandNo) const
Returns source data type for the band specified by number, source data type may be shorter than dataT...
DataType
Raster data types.
int dataTypeSize(int bandNo)
The QgsRasterHistogram is a container for histogram of a single raster band.
QList< QgsRasterBandStats > mStatistics
List of cached statistics, all bands mixed.
QgsRasterInterface * mInput
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
virtual bool on() const
Is on/off.