27 #include "../raster/BandProperty.h"
37 : te::rst::
Band( new te::rst::BandProperty(
38 *(blocksManager.getRaster()->getBand( idx )->getProperty()) ), idx ),
39 m_blocksManager( blocksManager )
50 : te::rst::
Band( new te::rst::BandProperty( 0, 0 ), 0 ), 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 write(int x, int y, void *buffer)
It writes a data block from the specified buffer.
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band.
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...
te::rst::Raster * getRaster() const
Returns the associated raster.
unsigned int m_blkWidth
The current band blocks width.
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_getBuffI
A pointer to a function that helps to extract the imaginary part value from a specific buffer data ty...
RAM cached and tiled raster band.
BandProperty * getProperty()
Returns the band property.
int m_blkw
Block width (pixels).
unsigned int m_blkSizeBytes
The blocks size (bytes);.
te::rst::SetBufferValueFPtr m_setBuffI
A pointer to a function that helps to insert the imaginary part value into a specific buffer data typ...
void setValue(unsigned int c, unsigned int r, const double value)
Sets the cell attribute value.
Band implementation for the In-Memory Raster.
void setIValue(unsigned int c, unsigned int r, const double value)
Sets the imaginary attribute value in a complex band of a cell.
static CachedBandBlocksManager dummyBlocksManager
A global static dummy blocks manager.
unsigned int m_blkHeight
The current band blocks height.
void read(int x, int y, void *buffer) const
It reads a data block to the specified buffer.
void getValue(unsigned int c, unsigned int r, double &value) const
Returns the cell attribute value.
int getType() const
It returns the data type of the elements in the band.
int m_blkh
Block height (pixels).
RAM cached and tiled raster band blocks manager.
void getIValue(unsigned int c, unsigned int r, double &value) const
Returns the imaginary attribute value in a complex band of a cell.
virtual int getBlockSize() const
It returns the number of bytes ocuppied by a data block.
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...