RAM cached and tiled raster band. More...
#include <CachedBand.h>
  
 Public Member Functions | |
| CachedBand (CachedBandBlocksManager &blocksManager, std::size_t idx) | |
| Constructor.  More... | |
| 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, rhs);.  More... | |
| virtual int | getBlockSize () const | 
| It returns the number of bytes ocuppied by a data block.  More... | |
| 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.  More... | |
| 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.  More... | |
| void | getIValue (unsigned int c, unsigned int r, double &value) const | 
| Returns the imaginary attribute value in a complex band of a cell.  More... | |
| virtual std::complex< double > | getMaxValue (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.  More... | |
| 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.  More... | |
| virtual std::complex< double > | getMinValue (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.  More... | |
| std::complex< double > | getOffsetValue () const | 
| It returns the offset values (real and imaginary) to be applied to the band.  More... | |
| BandProperty * | getProperty () | 
| Returns the band property.  More... | |
| const BandProperty * | getProperty () const | 
| Returns the band property.  More... | |
| te::rst::Raster * | getRaster () const | 
| Returns the associated raster.  More... | |
| std::complex< double > | getScaleValue () const | 
| It returns the scale values (real and imaginary) to be applied to the band.  More... | |
| 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.  More... | |
| void | getValue (unsigned int c, unsigned int r, double &value) const | 
| Returns the cell attribute value.  More... | |
| 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.  More... | |
| virtual Band & | operator*= (Band &rhs) | 
| It returns the band product (pixel by pixel).  More... | |
| virtual Band & | operator+= (Band &rhs) | 
| It returns the band sum (pixel by pixel).  More... | |
| virtual Band & | operator-= (Band &rhs) | 
| It returns the band subtraction (pixel by pixel).  More... | |
| virtual Band & | operator/= (Band &rhs) | 
| It returns the band division (pixel by pixel).  More... | |
| void | read (int x, int y, void *buffer) const | 
| It reads a data block to the specified buffer.  More... | |
| void * | read (int x, int y) | 
| It reads and returns a data block.  More... | |
| void | setIValue (unsigned int c, unsigned int r, const double value) | 
| Sets the imaginary attribute value in a complex band of a cell.  More... | |
| void | setOffsetValue (const std::complex< double > o) | 
| Sets the offset values (real and imaginary) to be applied to the band.  More... | |
| void | setScaleValue (const std::complex< double > s) | 
| Sets the scale values (real and imaginary) to be applied to the band.  More... | |
| void | setValue (unsigned int c, unsigned int r, const double value) | 
| Sets the cell attribute value.  More... | |
| 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.  More... | |
| void | write (int x, int y, void *buffer) | 
| It writes a data block from the specified buffer.  More... | |
| ~CachedBand () | |
Protected Attributes | |
| unsigned int | m_blkHeight | 
| The current band blocks height.  More... | |
| unsigned int | m_blkSizeBytes | 
| The blocks size (bytes);.  More... | |
| unsigned int | m_blkWidth | 
| The current band blocks width.  More... | |
| CachedBandBlocksManager & | m_blocksManager | 
| The external blocks manager reference.  More... | |
| te::rst::GetBufferValueFPtr | m_getBuff | 
| A pointer to a function that helps to extract a double or complex value from a specific buffer data type (char, int16, int32, float, ...).  More... | |
| te::rst::GetBufferValueFPtr | m_getBuffI | 
| A pointer to a function that helps to extract the imaginary part value from a specific buffer data type (cint16, cint32, cfloat, cdouble).  More... | |
| std::size_t | m_idx | 
| The band index.  More... | |
| BandProperty * | m_property | 
| The band information.  More... | |
| te::rst::SetBufferValueFPtr | m_setBuff | 
| A pointer to a function that helps to insert a double or complex value into a specific buffer data type (char, int16, int32, float, ...).  More... | |
| te::rst::SetBufferValueFPtr | m_setBuffI | 
| A pointer to a function that helps to insert the imaginary part value into a specific buffer data type (cint16, cint32, cfloat, cdouble).  More... | |
| unsigned int | m_setGetBlkX | 
| unsigned int | m_setGetBlkY | 
| void * | m_setGetBufPtr | 
| unsigned int | m_setGetPos | 
Static Protected Attributes | |
| static CachedBandBlocksManager | dummyBlocksManager | 
| A global static dummy blocks manager.  More... | |
Private Member Functions | |
| CachedBand () | |
RAM cached and tiled raster band.
A cache adaptor to an external existent raster band that must always be avaliable.
Definition at line 53 of file CachedBand.h.
| te::mem::CachedBand::CachedBand | ( | CachedBandBlocksManager & | blocksManager, | 
| std::size_t | idx | ||
| ) | 
Constructor.
| blocksManager | The blocks manager where to read/write data. | 
| idx | The band index. | 
Definition at line 35 of file CachedBand.cpp.
References te::rst::Raster::getBand(), te::rst::Band::getBlockSize(), te::rst::Band::getProperty(), te::mem::CachedBandBlocksManager::getRaster(), te::rst::BandProperty::getType(), te::rst::BandProperty::m_blkh, m_blkHeight, m_blkSizeBytes, te::rst::BandProperty::m_blkw, m_blkWidth, m_getBuff, m_getBuffI, m_setBuff, m_setBuffI, and te::rst::SetBlockFunctions().
| te::mem::CachedBand::~CachedBand | ( | ) | 
Definition at line 61 of file CachedBand.cpp.
      
  | 
  private | 
Definition at line 49 of file CachedBand.cpp.
References m_blkHeight, m_blkSizeBytes, m_blkWidth, m_getBuff, m_getBuffI, m_setBuff, and m_setBuffI.
      
  | 
  inherited | 
It calls a parameter function f to apply in all pixels from two bands, e.g. pixel = f(lhs, rhs);.
| (*f) | a function with the signature complex<double>(*f)(complex<double>, complex<double>), const Band& rhs) | 
| rhs | The rhs band to apply the function. | 
Definition at line 380 of file Band.cpp.
References te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getRaster(), te::rst::Band::getValue(), te::rst::BandProperty::m_noDataValue, te::common::RWAccess, and te::common::WAccess.
      
  | 
  virtualinherited | 
It returns the number of bytes ocuppied by a data block.
Reimplemented in te::mem::Band.
Definition at line 490 of file Band.cpp.
References te::rst::GetPixelSize().
Referenced by te::gdal::Band::Band(), te::rst::BandIteratorWindow< T >::BandIteratorWindow(), CachedBand(), te::rst::Copy(), te::gdal::Band::operator=(), te::rp::Contrast::remapBandLevels(), and te::mem::TiledBand::TiledBand().
      
  | 
  virtualinherited | 
It computes and returns the histogram occurring values (imaginary part) in a window of the band.
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
| b | The number of bins (intervals from minimum pixel to maximum). When b = 0, the histogram will be divided according to all pixel values. | 
Definition at line 276 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get().
      
  | 
  virtualinherited | 
It computes and returns the histogram occurring values (real part) in a window of the band.
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
| b | The number of bins (intervals from minimum pixel to maximum). When b = 0, the histogram will be divided according to all pixel values. | 
Definition at line 202 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get().
      
  | 
  virtual | 
Returns the imaginary attribute value in a complex band of a cell.
| c | The column location of the cell. | 
| r | The row location of the cell. | 
| value | The attribute value to be assigned. | 
| Exception | Subclasses may throw an exception if the data value can not be read. | 
Implements te::rst::Band.
Definition at line 87 of file CachedBand.cpp.
      
  | 
  virtualinherited | 
It computes and returns the maximum occurring value in a window of the band.
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
Definition at line 109 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get(), and te::rp::NormalizeRaster().
      
  | 
  virtualinherited | 
It computes and returns the mean of the occurring values in a window of the band.
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
Definition at line 173 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get().
      
  | 
  virtualinherited | 
It computes and returns the minimum occurring value in a window of the band.
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
Definition at line 80 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get(), and te::rp::NormalizeRaster().
      
  | 
  inherited | 
      
  | 
  inherited | 
Returns the band property.
Definition at line 370 of file Band.cpp.
Referenced by te::rst::AbstractBandIterator< T >::AbstractBandIterator(), te::mem::ExpansibleRaster::addTopBands(), te::rst::BandIteratorWindow< T >::BandIteratorWindow(), CachedBand(), te::rp::GeoMosaic::calcBandStatistics(), te::rp::TiePointsMosaic::calcBandStatistics(), te::rp::SequenceMosaic::calcBandStatistics(), te::rst::Band::callOperator(), te::rp::ConvertIHS2RGB(), te::rp::ConvertRBG2IHS(), te::rst::Copy(), te::tools::rastermanager::RasterManager::copyRaster(), te::mem::Raster::create(), te::rst::CreateCopy(), te::rp::Segmenter::createCutOffLinesTiff(), te::rp::SequenceMosaic::createDiskRasterCopy(), te::rp::SequenceMosaic::createRasterDataSet(), te::rp::Filter::DilationFilter(), te::mem::ExpansibleRaster::dummyFillAllBlocks(), te::rst::BandIteratorWindow< T >::end(), te::rst::BandIterator< T >::end(), te::rst::ConstBandIterator< T >::end(), te::rst::BandIteratorWithMask< T >::end(), te::rp::Filter::ErosionFilter(), te::rp::Contrast::execHistogramEqualizationContrast(), te::rp::Contrast::execLinearContrast(), te::rp::Contrast::execSetMeanAndStdContrast(), te::rp::GeoMosaic::execute(), te::rp::Register::execute(), te::rp::Filter::execute(), te::rp::TiePointsMosaic::execute(), te::rp::Skeleton::execute(), te::rp::Contrast::execute(), te::rp::SequenceMosaic::execute(), te::rp::Segmenter::execute(), te::map::GetExtentRaster(), te::rp::RasterAttributes::getMean(), te::tools::rastermanager::RasterManager::getRasterInfo(), te::rp::IHSFusion::getRGBRange(), te::map::RasterLayer::getSchema(), te::mem::CachedBandBlocksManager::initialize(), te::rp::Blender::initialize(), te::rp::SegmenterRegionGrowingStrategy::initializeSegments(), te::rst::Interpolator::Interpolator(), te::rp::IHSFusion::loadIHSData(), te::rp::Filter::MeanFilter(), te::rp::Filter::MedianFilter(), te::rp::Filter::ModeFilter(), te::mem::Raster::open(), te::rp::Contrast::remapBandLevels(), te::rst::Reproject(), te::rp::Filter::RobertsFilter(), te::serialize::xml::Save(), te::rp::IHSFusion::saveIHSData(), te::rp::Filter::SobelFilter(), te::mem::CachedBandBlocksManager::threadEntry(), and te::rp::Filter::UserDefinedFilter().
      
  | 
  inherited | 
      
  | 
  inlinevirtual | 
Returns the associated raster.
Implements te::rst::Band.
Definition at line 67 of file CachedBand.h.
      
  | 
  inherited | 
      
  | 
  virtualinherited | 
It computes and returns the standard deviation of the occurring values in a window of the band.
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
Definition at line 138 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get().
      
  | 
  virtual | 
Returns the cell attribute value.
| c | The column location of the cell. | 
| r | The row location of the cell. | 
| value | To return the attribute value. | 
| Exception | Subclasses may throw an exception if the data value can not be read. | 
Implements te::rst::Band.
Definition at line 65 of file CachedBand.cpp.
      
  | 
  virtualinherited | 
Returns the imaginary attribute value in a complex band of a cell.
| c | The column location of the cell. | 
| r | The row location of the cell. | 
| value | The complex attribute value to be assigned (real, imaginary). | 
| Exception | Subclasses may throw an exception if the data value can not be read. | 
Reimplemented in te::gdal::Band.
      
  | 
  virtualinherited | 
It returns the band product (pixel by pixel).
| rhs | The band to be multiplied, right-hand side. | 
Definition at line 480 of file Band.cpp.
References times().
      
  | 
  virtualinherited | 
It returns the band sum (pixel by pixel).
| rhs | The band to be added, right-hand side. | 
Definition at line 470 of file Band.cpp.
References plus().
      
  | 
  virtualinherited | 
It returns the band subtraction (pixel by pixel).
| rhs | The band to be subtracted, right-hand side. | 
Definition at line 475 of file Band.cpp.
References minus().
      
  | 
  virtualinherited | 
It returns the band division (pixel by pixel).
| rhs | The band to be divided, right-hand side. | 
Definition at line 485 of file Band.cpp.
References divide().
      
  | 
  virtual | 
It reads a data block to the specified buffer.
| x | The block-id in x (or x-offset). | 
| y | The block-id in y (or y-offset). | 
| buffer | The buffer to be used to read from the band. | 
Implements te::rst::Band.
Definition at line 109 of file CachedBand.cpp.
      
  | 
  inlinevirtual | 
It reads and returns a data block.
| x | The block-id in x (or x-offset). | 
| y | The block-id in y (or y-offset). | 
Implements te::rst::Band.
Definition at line 82 of file CachedBand.h.
      
  | 
  virtual | 
Sets the imaginary attribute value in a complex band of a cell.
| c | The column location of the cell. | 
| r | The row location of the cell. | 
| value | The attribute value to be assigned. | 
| Exception | Subclasses may throw an exception if the data value can not be write. | 
Implements te::rst::Band.
Definition at line 98 of file CachedBand.cpp.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  virtual | 
Sets the cell attribute value.
| c | The column location of the cell. | 
| r | The row location of the cell. | 
| value | The attribute value to be assigned. | 
| Exception | Subclasses may throw an exception if the data value can not be write. | 
Implements te::rst::Band.
Definition at line 76 of file CachedBand.cpp.
      
  | 
  virtualinherited | 
Sets the imaginary attribute value in a complex band of a cell.
| c | The column location of the cell. | 
| r | The row location of the cell. | 
| value | The complex attribute value to be assigned (real, imaginary). | 
| Exception | Subclasses may throw an exception if the data value can not be write. | 
Reimplemented in te::gdal::Band.
      
  | 
  virtual | 
It writes a data block from the specified buffer.
| x | The block-id in x (or x-offset). | 
| y | The block-id in y (or y-offset). | 
| buffer | The buffer to be used to write to the band. | 
Implements te::rst::Band.
Definition at line 116 of file CachedBand.cpp.
      
  | 
  staticprotected | 
A global static dummy blocks manager.
Definition at line 113 of file CachedBand.h.
      
  | 
  protected | 
The current band blocks height.
Definition at line 97 of file CachedBand.h.
Referenced by CachedBand().
      
  | 
  protected | 
      
  | 
  protected | 
The current band blocks width.
Definition at line 96 of file CachedBand.h.
Referenced by CachedBand().
      
  | 
  protected | 
The external blocks manager reference.
Definition at line 111 of file CachedBand.h.
      
  | 
  protected | 
A pointer to a function that helps to extract a double or complex value from a specific buffer data type (char, int16, int32, float, ...).
Definition at line 100 of file CachedBand.h.
Referenced by CachedBand().
      
  | 
  protected | 
A pointer to a function that helps to extract the imaginary part value from a specific buffer data type (cint16, cint32, cfloat, cdouble).
Definition at line 101 of file CachedBand.h.
Referenced by CachedBand().
      
  | 
  protectedinherited | 
The band index.
Definition at line 414 of file Band.h.
Referenced by te::rst::Band::operator=(), and te::gdal::Band::read().
      
  | 
  protectedinherited | 
The band information.
Definition at line 413 of file Band.h.
Referenced by te::grib::Band::Band(), te::mem::Band::Band(), te::gdal::Band::Band(), te::rst::Band::Band(), te::mem::ExpansibleBand::ExpansibleBand(), te::idl::IdlBand::IdlBand(), te::gdal::Band::operator=(), te::rst::Band::operator=(), and te::mem::TiledBand::TiledBand().
      
  | 
  protected | 
A pointer to a function that helps to insert a double or complex value into a specific buffer data type (char, int16, int32, float, ...).
Definition at line 102 of file CachedBand.h.
Referenced by CachedBand().
      
  | 
  protected | 
A pointer to a function that helps to insert the imaginary part value into a specific buffer data type (cint16, cint32, cfloat, cdouble).
Definition at line 103 of file CachedBand.h.
Referenced by CachedBand().
      
  | 
  mutableprotected | 
Definition at line 106 of file CachedBand.h.
      
  | 
  mutableprotected | 
Definition at line 107 of file CachedBand.h.
      
  | 
  mutableprotected | 
Definition at line 109 of file CachedBand.h.
      
  | 
  mutableprotected | 
Definition at line 108 of file CachedBand.h.