28 #ifndef __TERRALIB_RASTER_INTERNAL_BANDITERATORWINDOW_H 29 #define __TERRALIB_RASTER_INTERNAL_BANDITERATORWINDOW_H 32 #include "../common/STLUtils.h" 80 unsigned int getRow()
const;
193 :
m_w(static_cast<
int>(w)),
482 return (cc + cr *
m_blkw);
488 #endif // __TERRALIB_RASTER_INTERNAL_BANDITERATORWINDOW_H It gives access to values in one band (dimension) of a raster.
It describes one band (or dimension) of a raster.
BandIteratorWindow()
Constructor.
int m_blkw
The internal block width.
unsigned int getNumberOfColumns() const
Returns the raster number of columns.
unsigned int getColumn() const
Returns the current column in iterator.
int m_nblocksy
The number of blocks in Y direction.
int m_nblocksy
The number of blocks in y.
~BandIteratorWindow()
Destructor.
Band const * m_band
The band from where to get the values.
void(* SetBufferValueFPtr)(int index, void *buffer, const double *value)
The type of function used to extract data from a buffer.
unsigned int getRow() const
Returns the current row in iterator.
BandIteratorWindow & operator=(const BandIteratorWindow &rhs)
Assignment operator.
void operator++()
Advances to the next position.
int m_blky
The position in Y of the current block.
void(* GetBufferValueFPtr)(int index, void *buffer, double *value)
The type of function used to extract data from a buffer.
int m_blkx
The position in X of the current block.
int m_blkh
The internal block height.
bool operator!=(const BandIteratorWindow &rhs) const
Differece operator.
unsigned int getNumberOfRows() const
Returns the raster number of rows.
te::rst::GetBufferValueFPtr m_getBuffI
A pointer to a function that helps to extract the imaginary part value from a specific buffer data ty...
BandProperty * getProperty()
Returns the band property.
int m_h
The height of the window to iterate.
T * getBlock(int c, int r) const
Returns the correct block where relative value is used.
int m_npxlsblk
The maximum number of pixels inside the block.
int m_i
The actual position inside the block.
int m_nvblocksy
The amount of blocks in direction Y in vector of internal blocks.
A raster band description.
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...
static BandIteratorWindow end(Band const *const b, std::size_t w, const std::size_t h)
Returns an iterator referring to after the end of the iterator.
void replaceBlocks()
Replaces the current bufferized blocks.
int m_cblock
The index of the central block;.
BandIteratorWindow operator*()
int m_w
The width of the window to iterate.
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 read(int x, int y, void *buffer) const =0
It reads a data block to the specified buffer.
virtual Raster * getRaster() const =0
Returns the associated raster.
int m_nvblocksx
The amount of blocks in direction X in vector of internal blocks.
void operator--()
Returns to the previous position.
int m_nblocksx
The number of blocks in X direction.
int getType() const
It returns the data type of the elements in the band.
int m_lastblksize
The number of pixels inside the last block.
It implements and iterator to "navigate" over a single band, optimized by a window structure (e...
std::vector< T * > m_blocks
A vector of internal blocks, to provide fast access to window elements.
static BandIteratorWindow begin(Band const *const b, std::size_t w, const std::size_t h)
Returns an iterator referring to the first value of the band.
T getValue() const
Returns the value in current position (column, row) from iterator.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
virtual int getBlockSize() const
It returns the number of bytes ocuppied by a data block.
int getRelativeIndex(int c, int r) const
Returns the correct index where the relative value is in the relative block.
te::rst::SetBufferValueFPtr m_setBuffI
A pointer to a function that helps to insert the imaginary part value into a specific buffer data typ...
TERASTEREXPORT void SetBlockFunctions(GetBufferValueFPtr *gb, GetBufferValueFPtr *gbi, SetBufferValueFPtr *sb, SetBufferValueFPtr *sbi, int type)
Sets the pointers to functions that helps to extract a double or complex value from a specific buffer...