15#ifndef GDALMASKBANDS_H_INCLUDED
16#define GDALMASKBANDS_H_INCLUDED
19#include "gdal_rasterband.h"
34 int nYSize,
void *pData,
int nBufXSize,
int nBufYSize,
37 GDALRasterIOExtraArg *psExtraArg)
override;
45 explicit GDALAllValidMaskBand(GDALRasterBand *);
46 ~GDALAllValidMaskBand()
override;
58 return GMVR_0_AND_255_ONLY;
62 double *pdfMean,
double *pdfStdDev,
63 GDALProgressFunc,
void *pProgressData)
override;
72 friend class GDALRasterBand;
73 double m_dfNoDataValue = 0;
74 int64_t m_nNoDataValueInt64 = 0;
75 uint64_t m_nNoDataValueUInt64 = 0;
76 GDALRasterBand *m_poParent =
nullptr;
84 GDALRasterIOExtraArg *psExtraArg)
override;
90 explicit GDALNoDataMaskBand(GDALRasterBand *);
91 explicit GDALNoDataMaskBand(GDALRasterBand *,
double dfNoDataValue);
92 ~GDALNoDataMaskBand()
override;
101 return GMVR_0_AND_255_ONLY;
104 static bool IsNoDataInRange(
double dfNoDataValue,
GDALDataType eDataType);
111class CPL_DLL GDALNoDataValuesMaskBand final :
public GDALRasterBand
113 double *padfNodataValues;
124 explicit GDALNoDataValuesMaskBand(GDALDataset *);
125 ~GDALNoDataValuesMaskBand()
override;
134 return GMVR_0_AND_255_ONLY;
144 GDALRasterBand *poParent;
153 GDALRasterIOExtraArg *psExtraArg)
override;
159 explicit GDALRescaledAlphaBand(GDALRasterBand *);
160 ~GDALRescaledAlphaBand()
override;
A single raster band (or channel).
Definition gdal_rasterband.h:105
virtual int GetMaskFlags()
Return the status flags of the mask band associated with the band.
Definition gdalrasterband.cpp:9387
virtual bool IsMaskBand() const
Returns whether a band is a mask band.
Definition gdalrasterband.cpp:9525
virtual GDALRasterBand * GetMaskBand()
Return the mask band associated with the band.
Definition gdalrasterband.cpp:9051
virtual CPLErr IReadBlock(int nBlockXOff, int nBlockYOff, void *pData)=0
Default internal implementation ... to be overridden by subclasses that support reading.
virtual CPLErr ComputeStatistics(int bApproxOK, double *pdfMin, double *pdfMax, double *pdfMean, double *pdfStdDev, GDALProgressFunc, void *pProgressData)
Compute image statistics.
Definition gdalrasterband.cpp:6884
virtual bool EmitErrorMessageIfWriteNotSupported(const char *pszCaller) const
Emit an error message if a write operation to this band is not supported.
Definition gdalrasterband.cpp:1302
virtual CPLErr IRasterIO(GDALRWFlag eRWFlag, int nXOff, int nYOff, int nXSize, int nYSize, void *pData, int nBufXSize, int nBufYSize, GDALDataType eBufType, GSpacing nPixelSpace, GSpacing nLineSpace, GDALRasterIOExtraArg *psExtraArg)
Read/write a region of image data for this band.
Definition rasterio.cpp:223
virtual GDALMaskValueRange GetMaskValueRange() const
Returns the range of values that a mask band can take.
Definition gdalrasterband.cpp:9576
CPLErr
Error category.
Definition cpl_error.h:37
Core portability definitions for CPL.
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition cpl_port.h:936
GIntBig GSpacing
Type to express pixel, line or band spacing.
Definition gdal.h:386
GDALDataType
Definition gdal.h:48
GDALRWFlag
Definition gdal.h:125