Band implemntatin for GRIB. More...
#include <Band.h>
  
 Public Member Functions | |
| Band (Raster *r, std::size_t idx, grib_handle *handle) | |
| Band (const Band &rhs) | |
| 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... | |
| Band & | callOperator (std::complex< double >(*f)(std::complex< double >, std::complex< double >), std::complex< double > &cvalue) | 
| It calls a parameter function f to apply in all pixels from the band, e.g. pixel = f(lhs, rhs);.  More... | |
| virtual int | getBlockSize () const | 
| It returns the number of bytes ocuppied by a data block.  More... | |
| double | getDouble (const char *key) const | 
| grib_handle * | getHandle () const | 
| 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... | |
| long | getLong (const char *key) const | 
| 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.  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 (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.  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... | |
| std::string | getString (const char *key) const | 
| 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*= (std::complex< double > &cvalue) | 
| It returns the product of a constant value to all pixels in the band.  More... | |
| virtual Band & | operator+= (Band &rhs) | 
| It returns the band sum (pixel by pixel).  More... | |
| virtual Band & | operator+= (std::complex< double > &cvalue) | 
| It returns the sum of a constant value to all pixels in the band.  More... | |
| virtual Band & | operator-= (Band &rhs) | 
| It returns the band subtraction (pixel by pixel).  More... | |
| virtual Band & | operator-= (std::complex< double > &cvalue) | 
| It returns the difference from all pixels in the band to a constant value (pixel - constant).  More... | |
| virtual Band & | operator/= (Band &rhs) | 
| It returns the band division (pixel by pixel).  More... | |
| virtual Band & | operator/= (std::complex< double > &cvalue) | 
| It returns the division of all pixels in the band by a constant value (pixel / constant).  More... | |
| Band & | operator= (const Band &rhs) | 
| 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... | |
| ~Band () | |
| Virtual destructor.  More... | |
Static Public Member Functions | |
| static std::string | getErrMsg (int errCode) | 
Protected Attributes | |
| std::size_t | m_idx | 
| The band index.  More... | |
| BandProperty * | m_property | 
| The band information.  More... | |
Private Attributes | |
| double * | m_data | 
| The matrix data.  More... | |
| grib_handle * | m_handle | 
| The grib handle.  More... | |
| Raster * | m_raster | 
| The associated raster.  More... | |
| te::grib::Band::Band | ( | Raster * | r, | 
| std::size_t | idx, | ||
| grib_handle * | handle | ||
| ) | 
Definition at line 40 of file Band.cpp.
References te::dt::DOUBLE_TYPE, getDouble(), getLong(), te::rst::BandProperty::m_blkh, te::rst::BandProperty::m_blkw, m_data, m_handle, te::rst::BandProperty::m_nblocksx, te::rst::BandProperty::m_nblocksy, te::rst::BandProperty::m_noDataValue, and te::rst::Band::m_property.
| te::grib::Band::Band | ( | const Band & | rhs | ) | 
      
  | 
  virtual | 
      
  | 
  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>) | 
| rhs | The rhs band to apply the function. | 
Definition at line 438 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.
      
  | 
  inherited | 
It calls a parameter function f to apply in all pixels from the band, e.g. pixel = f(lhs, rhs);.
| (*f) | a function with the signature complex<double>(*f)(complex<double>, complex<double>) | 
| cvalue | The constant value that will work with the generic function. | 
Definition at line 508 of file Band.cpp.
References 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 630 of file Band.cpp.
References te::rst::GetPixelSize().
Referenced by te::gdal::Band::Band(), te::rst::BandIteratorWindow< T >::BandIteratorWindow(), te::rp::Blender::blendIntoRaster1(), te::mem::CachedBand::CachedBand(), te::rst::Copy(), te::rp::Segmenter::execute(), te::rp::GetCovarianceValueThread(), te::rp::GetMeanValueThread(), te::rp::GetStdDevValueThread(), te::rst::SynchronizedBandBlocksManager::initialize(), te::gdal::Band::operator=(), te::rp::Contrast::remapBandLevels(), te::rp::RemapValuesThread(), te::rst::SynchronizedBand::SynchronizedBand(), and te::mem::TiledBand::TiledBand().
| double te::grib::Band::getDouble | ( | const char * | key | ) | const | 
      
  | 
  static | 
Definition at line 181 of file Band.cpp.
Referenced by te::grib::Raster::open().
      
  | 
  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 334 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 260 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 107 of file Band.cpp.
References TR_GRIB.
| long te::grib::Band::getLong | ( | const char * | key | ) | const | 
      
  | 
  virtualinherited | 
It computes and returns the maximum occurring value in a window of the band.
| readall | Force the reading the entire image (can be slow). If false, will read up to 1000 pixels of the image, equally spaced. | 
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
Definition at line 139 of file Band.cpp.
References te::rst::PointSetIterator< T >::begin(), te::rst::PointSetIterator< T >::end(), te::rst::PointSetIterator< T >::getColumn(), te::rst::GetRandomPointsInRaster(), and te::rst::PointSetIterator< T >::getRow().
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 231 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.
| readall | Force the reading the entire image (can be slow). If false, will read up to 1000 pixels of the image, equally spaced. | 
| rs | The starting row. | 
| cs | The starting column. | 
| rf | The final row. | 
| cf | The final column. | 
Definition at line 82 of file Band.cpp.
References te::rst::PointSetIterator< T >::begin(), te::rst::PointSetIterator< T >::end(), te::rst::PointSetIterator< T >::getColumn(), te::rst::GetRandomPointsInRaster(), and te::rst::PointSetIterator< T >::getRow().
Referenced by te::rst::RasterSummaryManager::get(), and te::rp::NormalizeRaster().
      
  | 
  inherited | 
      
  | 
  inherited | 
Returns the band property.
Definition at line 428 of file Band.cpp.
Referenced by te::rst::AbstractBandIterator< T >::AbstractBandIterator(), te::mem::ExpansibleRaster::addTopBands(), te::rst::BandIteratorWindow< T >::BandIteratorWindow(), te::rp::Blender::blendIntoRaster1(), te::rp::Blender::blendIntoRaster1Thread(), te::qt::widgets::ColorTransformWizard::buildOutputRaster(), te::mem::CachedBand::CachedBand(), te::rp::GeoMosaic::calcBandStatistics(), te::rp::TiePointsMosaic::calcBandStatistics(), te::rp::SequenceMosaic::calcBandStatistics(), te::rst::Band::callOperator(), te::rp::ConvertIHS2RGB(), te::rp::ConvertRGB2IHS(), te::rst::Copy(), te::rp::Copy2DiskRaster(), 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::rst::CropRaster(), te::rp::DecomposeBands(), 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::ArithmeticOperations::execBinaryOperatorRasterXRaster(), te::rp::ArithmeticOperations::execBinaryOperatorRasterXReal(), te::rp::Contrast::execDecorrelationEnhancement(), te::rp::Contrast::execHistogramEqualizationContrast(), te::rp::Contrast::execLinearContrast(), te::rp::Contrast::execLogContrast(), te::rp::Contrast::execSetMeanAndStdContrast(), te::rp::Contrast::execSquareContrast(), te::rp::Contrast::execSquareRootContrast(), te::rp::GeoMosaic::execute(), te::rp::Register::execute(), te::rp::ArithmeticOperations::execute(), te::rp::Filter::execute(), te::rp::TiePointsMosaic::execute(), te::rp::WisperFusion::execute(), te::rp::Skeleton::execute(), te::rp::SequenceMosaic::execute(), te::rp::Segmenter::execute(), te::rp::Contrast::execute(), te::rp::GetCovarianceValue(), te::rp::GetCovarianceValueThread(), te::map::GetExtentRaster(), te::rp::RasterAttributes::getGLCM(), te::rp::GetMeanValue(), te::rp::GetMeanValueThread(), te::tools::rastermanager::RasterManager::getRasterInfo(), te::rp::IHSFusion::getRGBRange(), te::map::RasterLayer::getSchema(), te::rp::GetStdDevValue(), te::rp::GetStdDevValueThread(), te::rst::SynchronizedBandBlocksManager::initialize(), te::mem::CachedBandBlocksManager::initialize(), te::rp::Blender::initialize(), te::rst::Interpolator::initialize(), te::rp::InverseWaveletAtrous(), te::rp::IHSFusion::loadIHSData(), te::rp::PCAFusion::loadRessampledRaster(), te::rp::Filter::MeanFilter(), te::rp::Filter::MedianFilter(), te::rp::Filter::ModeFilter(), te::mem::Raster::open(), te::rp::RasterResample(), te::rst::RasterSynchronizer::RasterSynchronizer(), te::rp::Contrast::remapBandLevels(), te::rp::RemapValues(), te::rp::RemapValuesThread(), te::rst::Reproject(), te::rp::Filter::RobertsFilter(), te::serialize::xml::Save(), te::rp::IHSFusion::saveIHSData(), te::qt::widgets::LayerPropertiesInfo::setLayerRasterProperties(), te::rp::Filter::SobelFilter(), te::rp::PCAFusion::swapBandByHighResRaster(), te::rst::SynchronizedBand::SynchronizedBand(), te::mem::CachedBandBlocksManager::threadEntry(), te::rp::Filter::UserDefinedFilter(), and te::rst::Vectorizer::Vectorizer().
      
  | 
  inherited | 
      
  | 
  virtual | 
      
  | 
  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 196 of file Band.cpp.
Referenced by te::rst::RasterSummaryManager::get().
| std::string te::grib::Band::getString | ( | const char * | key | ) | const | 
      
  | 
  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.
      
  | 
  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 615 of file Band.cpp.
References times().
      
  | 
  virtualinherited | 
It returns the product of a constant value to all pixels in the band.
| cvalue | The constant value to be multiplied. | 
Definition at line 610 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 590 of file Band.cpp.
References plus().
      
  | 
  virtualinherited | 
It returns the sum of a constant value to all pixels in the band.
| cvalue | The constant value to be added. | 
Definition at line 595 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 600 of file Band.cpp.
References minus().
      
  | 
  virtualinherited | 
It returns the difference from all pixels in the band to a constant value (pixel - constant).
| cvalue | The constant value to be subtracted. | 
Definition at line 605 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 620 of file Band.cpp.
References divide().
      
  | 
  virtualinherited | 
It returns the division of all pixels in the band by a constant value (pixel / constant).
| cvalue | The constant value to be divided. | 
Definition at line 625 of file Band.cpp.
References divide().
| te::grib::Band & te::grib::Band::operator= | ( | const Band & | rhs | ) | 
      
  | 
  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.
      
  | 
  virtual | 
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.
      
  | 
  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 112 of file Band.cpp.
References TR_GRIB.
      
  | 
  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.
      
  | 
  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.
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  protectedinherited | 
The band index.
Definition at line 475 of file Band.h.
Referenced by te::rst::Band::operator=(), and te::gdal::Band::read().
      
  | 
  protectedinherited | 
The band information.
Definition at line 474 of file Band.h.
Referenced by 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=(), te::rst::SynchronizedBand::SynchronizedBand(), and te::mem::TiledBand::TiledBand().
      
  | 
  private |