27 #include "../raster/BandProperty.h" 
   28 #include "../raster/Utils.h" 
   39 : te::rst::
Band( new te::rst::BandProperty( bandProperty ), idx ),
 
   40   m_blocksManager( blocksManager ),
 
   41   m_parentRasterPtr( &parentRaster ),
 
   42   m_blkWidth( (unsigned int)bandProperty.m_blkw ),
 
   43   m_blkHeight( (unsigned int)bandProperty.m_blkh ),
 
   44   m_blkSizeBytes( (unsigned int)( bandProperty.m_blkw * bandProperty.m_blkh * 
 
   52 : te::rst::
Band( new te::rst::BandProperty( 0, 0 ), 0 ), 
 
   53   m_blocksManager( dummyBlocksManager )
 
   67   m_setGetBlkX = c / m_blkWidth;
 
   68   m_setGetBlkY = r / m_blkHeight;
 
   69   m_setGetPos = c % m_blkWidth + ((r % m_blkHeight) * m_blkWidth);
 
   70   assert(m_setGetPos < ( m_blkWidth * m_blkHeight ) );
 
   71   m_setGetBufPtr = m_blocksManager.getBlockPointer( m_idx, m_setGetBlkX, 
 
   73   m_getBuff(m_setGetPos, m_setGetBufPtr, &value );
 
   78   m_setGetBlkX = c / m_blkWidth;
 
   79   m_setGetBlkY = r / m_blkHeight;
 
   80   m_setGetPos = c % m_blkWidth + ((r % m_blkHeight) * m_blkWidth);
 
   81   assert(m_setGetPos < ( m_blkWidth * m_blkHeight ) );
 
   82   m_setGetBufPtr = m_blocksManager.getBlockPointer( m_idx, m_setGetBlkX, 
 
   84   m_setBuff(m_setGetPos, m_setGetBufPtr, &value );
 
   89   m_setGetBlkX = c / m_blkWidth;
 
   90   m_setGetBlkY = r / m_blkHeight;
 
   91   m_setGetPos = c % m_blkWidth + ((r % m_blkHeight) * m_blkWidth);
 
   92   assert(m_setGetPos < ( m_blkWidth * m_blkHeight ) );
 
   93   m_setGetBufPtr = m_blocksManager.getBlockPointer( m_idx, m_setGetBlkX, 
 
   95   m_getBuffI(m_setGetPos, m_setGetBufPtr, &value );
 
  100   m_setGetBlkX = c / m_blkWidth;
 
  101   m_setGetBlkY = r / m_blkHeight;
 
  102   m_setGetPos = c % m_blkWidth + ((r % m_blkHeight) * m_blkWidth);
 
  103   assert(m_setGetPos < ( m_blkWidth * m_blkHeight ) );
 
  104   m_setGetBufPtr = m_blocksManager.getBlockPointer( m_idx, m_setGetBlkX, 
 
  106   m_setBuffI(m_setGetPos, m_setGetBufPtr, &value );
 
  111   assert( m_blocksManager.isInitialized() );
 
  112   memcpy( buffer, m_blocksManager.getBlockPointer( m_idx, x, y ),
 
  118   assert( m_blocksManager.isInitialized() );
 
  119   memcpy( m_blocksManager.getBlockPointer( m_idx, x, y ), buffer,
 
void setValue(unsigned int c, unsigned int r, const double value)
Sets the cell attribute value. 
 
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...
 
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...
 
void write(int x, int y, void *buffer)
It writes a data block from the specified buffer. 
 
TERASTEREXPORT int GetPixelSize(int datatype)
Returns the byte size of a given datatype. 
 
void getIValue(unsigned int c, unsigned int r, double &value) const 
Returns the imaginary attribute value in a complex band of a cell. 
 
void setIValue(unsigned int c, unsigned int r, const double value)
Sets the imaginary attribute value in a complex band of a cell. 
 
RAM cached and tiled raster band blocks manager. 
 
te::rst::SetBufferValueFPtr m_setBuffI
A pointer to a function that helps to insert the imaginary part value into a specific buffer data typ...
 
int m_type
The data type of the elements in the band. 
 
static ExpansibleBandBlocksManager dummyBlocksManager
A global static dummy blocks manager. 
 
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...
 
A raster band description. 
 
void getValue(unsigned int c, unsigned int r, double &value) const 
Returns the cell attribute value. 
 
An abstract class for raster data strucutures. 
 
Band implementation for the In-Memory Raster. 
 
te::rst::GetBufferValueFPtr m_getBuffI
A pointer to a function that helps to extract the imaginary part value from a specific buffer data ty...
 
void read(int x, int y, void *buffer) const 
It reads a data block to the specified buffer. 
 
BandProperty * m_property
The band information.