26#ifndef __TERRALIB_GDAL_INTERNAL_BAND_H
27#define __TERRALIB_GDAL_INTERNAL_BAND_H
30#include "../raster/Band.h"
31#include "../raster/BandProperty.h"
32#include "../raster/BlockUtils.h"
33#include "../raster/Raster.h"
77 Band(
Raster* rstPtr, std::size_t idx, GDALRasterBand* gdalRasterBandPtr );
87 void getValue(
unsigned int c,
unsigned int r,
double& value)
const;
89 void setValue(
unsigned int c,
unsigned int r,
const double value);
91 void getIValue(
unsigned int c,
unsigned int r,
double& value)
const;
93 void setIValue(
unsigned int c,
unsigned int r,
const double value);
99 void read(
int x,
int y,
void* buffer)
const;
103 void write(
int x,
int y,
void* buffer);
105 void getBlockBuffer(
void* buffer,
int x0,
int y0,
int width,
int height,
int outWidth,
int outHeight,
int dataType);
107 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;
109 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;
111 virtual std::complex<double>
getStdValue(
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0)
const;
113 virtual std::complex<double>
getMeanValue(
unsigned int rs = 0,
unsigned int cs = 0,
unsigned int rf = 0,
unsigned int cf = 0)
const;
115 virtual void getHistogramR(
const unsigned int rowStart,
const unsigned int colStart,
const unsigned int finalRow,
const unsigned int finalCol,
const unsigned int histoBins,
116 const unsigned int sampleStep, std::map<double, unsigned>& histogram)
const;
This class represents raster band description.
int m_currC
Block column position.
void setValue(unsigned int c, unsigned int r, const double value)
Sets the cell attribute value.
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.
te::rst::GetBufferValueFPtr m_getBuff
A pointer to a function that helps to extract a double or complex value from a specific buffer data t...
int m_currR
Block row position.
void setIValue(unsigned int c, unsigned int r, const double value)
Sets the imaginary attribute value in a complex band of a cell.
void getValueFromBlock(void *block, unsigned int pos, std::complex< double > &value) const
GDALRasterBand * m_rasterBand
GDAL Raster band.
te::rst::GetBufferValueFPtr m_getBuffI
A pointer to a function that helps to extract the imaginary part value from a specific buffer data ty...
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.
void getValueFromBlock(void *block, unsigned int pos, double &value) const
int placeBuffer(unsigned c, unsigned r) const
Places the buffer in position adequate to obtain row/column values.
te::rst::Raster * m_raster
The type of function used to insert/extract data from buffers.
int m_currX
Block x position.
te::rst::Raster * getRaster() const
Returns the associated raster.
void getIValue(unsigned int c, unsigned int r, double &value) const
Returns the imaginary attribute value in a complex band of a cell.
void getValue(unsigned int c, unsigned int r, double &value) const
Returns the cell attribute value.
void read(int x, int y, void *buffer) const
It reads a data block to the specified buffer.
void * m_buffer
An internal buffer.
~Band()
Virtual destructor.
Band & operator=(const Band &rhs)
bool m_update_buffer
Flag to update buffer.
int m_x
Actual x buffer position.
void * read(int, int)
It reads and returns a data block.
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.
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.
te::rst::SetBufferValueFPtr m_setBuff
A pointer to a function that helps to insert a double or complex value into a specific buffer data ty...
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.
GDALDataType m_gdaltype
The GDAL Data type.
Band(Raster *rstPtr, std::size_t idx, GDALRasterBand *gdalRasterBandPtr)
Constructor.
int m_y
Actual y buffer position.
int m_currY
Block y position.
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.
void write(int x, int y, void *buffer)
It writes a data block from the specified buffer.
te::rst::SetBufferValueFPtr m_setBuffI
A pointer to a function that helps to insert the imaginary part value into a specific buffer data typ...
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.
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.
This class represents Raster data.
A raster band description.
virtual void getValue(unsigned int c, unsigned int r, double &value) const =0
Returns the cell attribute value.
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.
This file contains include headers for the TerraLib GDAL driver.
void(* SetBufferValueFPtr)(int index, void *buffer, const double *value)
The type of function used to extract data from a buffer.
void(* GetBufferValueFPtr)(int index, void *buffer, double *value)
The type of function used to extract data from a buffer.
#define TEGDALEXPORT
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).