26 #ifndef __TERRALIB_RASTER_INTERNAL_BAND_H
27 #define __TERRALIB_RASTER_INTERNAL_BAND_H
103 virtual void getValue(
unsigned int c,
unsigned int r,
double& value)
const = 0;
116 virtual void setValue(
unsigned int c,
unsigned int r,
const double value) = 0;
129 virtual void getIValue(
unsigned int c,
unsigned int r,
double& value)
const = 0;
142 virtual void setIValue(
unsigned int c,
unsigned int r,
const double value) = 0;
155 virtual void getValue(
unsigned int c,
unsigned int r, std::complex<double>& value)
const;
168 virtual void setValue(
unsigned int c,
unsigned int r,
const std::complex<double>& value);
181 virtual void read(
int x,
int y,
void* buffer)
const = 0;
193 virtual void*
read(
int x,
int y) = 0;
206 virtual void write(
int x,
int y,
void* buffer) = 0;
221 virtual void getBlockBuffer(
void* buffer,
int x0,
int y0,
int width,
int height,
int outWidth,
int outHeight,
int dataType);
238 virtual std::complex<double>
getMinValue(
bool readall =
false,
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0)
const;
255 virtual std::complex<double>
getMaxValue(
bool readall =
false,
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0)
const;
271 virtual std::complex<double>
getStdValue(
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0)
const;
287 virtual std::complex<double>
getMeanValue(
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0)
const;
304 virtual std::map<double, unsigned>
getHistogramR(
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0,
unsigned int b = 0)
const;
324 const unsigned int colStart,
325 const unsigned int finalRow,
326 const unsigned int finalCol,
327 const unsigned int histoBins,
328 const unsigned int sampleStep,
329 std::map<double, unsigned>& histogram )
const;
346 virtual std::map<double, unsigned>
getHistogramI(
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0,
unsigned int b = 0)
const;
394 Band&
callOperator(std::complex<double>(*f)(std::complex<double>, std::complex<double>), std::complex<double>& cvalue);
A raster band description.
A raster band description.
virtual void * read(int x, int y)=0
It reads and returns a data block.
Band(BandProperty *p, std::size_t idx)
Constructor.
virtual void getValue(unsigned int c, unsigned int r, std::complex< double > &value) const
Returns the imaginary attribute value in a complex band of a cell.
virtual Band & operator/=(std::complex< double > &cvalue)
It returns the division of all pixels in the band by a constant value (pixel / constant).
virtual std::complex< double > getMeanValue(unsigned int rs=0, unsigned int cs=0, unsigned int rf=0, unsigned int cf=0) const
It computes and returns the mean of the occurring values in a window of the band.
void setOffsetValue(const std::complex< double > o)
Sets the offset values (real and imaginary) to be applied to the band.
virtual void getIValue(unsigned int c, unsigned int r, double &value) const =0
Returns the imaginary attribute value in a complex band of a cell.
virtual std::complex< double > getStdValue(unsigned int rs=0, unsigned int cs=0, unsigned int rf=0, unsigned int cf=0) const
It computes and returns the standard deviation of the occurring values in a window of the band.
std::complex< double > getScaleValue() const
It returns the scale values (real and imaginary) to be applied to the band.
virtual Band & operator=(const Band &rhs)
Assignment operator.
virtual void read(int x, int y, void *buffer) const =0
It reads a data block to the specified buffer.
virtual int getBlockSize() const
It returns the number of bytes ocuppied by a data block.
virtual Band & operator-=(std::complex< double > &cvalue)
It returns the difference from all pixels in the band to a constant value (pixel - constant).
std::complex< double > getOffsetValue() const
It returns the offset values (real and imaginary) to be applied to the band.
BandProperty * getProperty()
Returns the band property.
Band(const Band &rhs)
Copy constructor.
virtual void setValue(unsigned int c, unsigned int r, const std::complex< double > &value)
Sets the imaginary attribute value in a complex band of a cell.
const BandProperty * getProperty() const
Returns the band property.
virtual Band & operator*=(std::complex< double > &cvalue)
It returns the product of a constant value to all pixels in the band.
Band & callOperator(std::complex< double >(*f)(std::complex< double >, std::complex< double >), Band &rhs)
It calls a parameter function f to apply in all pixels from two bands, e.g. pixel = f(lhs,...
virtual Band & operator/=(Band &rhs)
It returns the band division (pixel by pixel).
Band & callOperator(std::complex< double >(*f)(std::complex< double >, std::complex< double >), std::complex< double > &cvalue)
It calls a parameter function f to apply in all pixels from the band, e.g. pixel = f(lhs,...
virtual void getValue(unsigned int c, unsigned int r, double &value) const =0
Returns the cell attribute value.
virtual std::complex< double > getMaxValue(bool readall=false, unsigned int rs=0, unsigned int cs=0, unsigned int rf=0, unsigned int cf=0) const
It computes and returns the maximum occurring value in a window of the band.
virtual void getHistogramR(const unsigned int rowStart, const unsigned int colStart, const unsigned int finalRow, const unsigned int finalCol, const unsigned int histoBins, const unsigned int sampleStep, std::map< double, unsigned > &histogram) const
It computes and returns the histogram occurring values (real part) in a window of the band.
virtual ~Band()
Virtual destructor.
virtual std::complex< double > getMinValue(bool readall=false, unsigned int rs=0, unsigned int cs=0, unsigned int rf=0, unsigned int cf=0) const
It computes and returns the minimum occurring value in a window of the band.
std::size_t m_idx
The band index.
virtual std::map< double, unsigned > getHistogramR(unsigned int rs=0, unsigned int cs=0, unsigned int rf=0, unsigned int cf=0, unsigned int b=0) const
It computes and returns the histogram occurring values (real part) in a window of the band.
virtual Band & operator-=(Band &rhs)
It returns the band subtraction (pixel by pixel).
virtual void write(int x, int y, void *buffer)=0
It writes a data block from the specified buffer.
virtual std::map< double, unsigned > getHistogramI(unsigned int rs=0, unsigned int cs=0, unsigned int rf=0, unsigned int cf=0, unsigned int b=0) const
It computes and returns the histogram occurring values (imaginary part) in a window of the band.
virtual Band & operator+=(Band &rhs)
It returns the band sum (pixel by pixel).
void setScaleValue(const std::complex< double > s)
Sets the scale values (real and imaginary) to be applied to the band.
virtual Raster * getRaster() const =0
Returns the associated raster.
virtual void getBlockBuffer(void *buffer, int x0, int y0, int width, int height, int outWidth, int outHeight, int dataType)
It gets the buffer in just only one block that represents the region informed.
virtual Band & operator+=(std::complex< double > &cvalue)
It returns the sum of a constant value to all pixels in the band.
BandProperty * m_property
The band information.
virtual Band & operator*=(Band &rhs)
It returns the band product (pixel by pixel).
virtual void setIValue(unsigned int c, unsigned int r, const double value)=0
Sets the imaginary attribute value in a complex band of a cell.
virtual void setValue(unsigned int c, unsigned int r, const double value)=0
Sets the cell attribute value.
An abstract class for raster data strucutures.
Raster implementaton for TerraLib 4.x.
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).