A singleton for keeping raster summaries (most statistics). It stores an internal map of raster conn info str and their respective summaries. More...
#include <RasterSummaryManager.h>
Public Member Functions | |
| void | add (const Raster *raster, RasterSummary *summary) |
| Adds a new entry in the summary manager. More... | |
| const RasterSummary * | find (const Raster *raster) const |
| It searches for a raster summary. More... | |
| const RasterSummary * | get (const Raster *raster, const SummaryTypes st, bool readall=false) |
| It searches for a raster summary. If not found it creates the summary and returns it. More... | |
| const unsigned int | getRealValuesRasterHistSize () const |
| Returns the current real values raster histogram size. More... | |
| void | remove (const Raster *raster) |
| Removes the summary from the specified raster. More... | |
| void | setRealValuesRasterHistSize (const unsigned int newSize) |
| Set the real values raster histogram size. More... | |
| ~RasterSummaryManager () | |
| Destructor. More... | |
Static Public Member Functions | |
| static RasterSummaryManager & | getInstance () |
| It returns a reference to the singleton instance. More... | |
Protected Member Functions | |
| RasterSummaryManager () | |
| Constructor. More... | |
Private Attributes | |
| std::map< std::string, RasterSummary * > | m_rasterSummaries |
| A map of rasters conn info and their respective summaries. More... | |
| unsigned int | m_realValuesRasterHistSize |
| Real values raster histogram size (default:255). More... | |
Friends | |
| class | te::common::Singleton< RasterSummaryManager > |
A singleton for keeping raster summaries (most statistics). It stores an internal map of raster conn info str and their respective summaries.
Definition at line 56 of file RasterSummaryManager.h.
| te::rst::RasterSummaryManager::~RasterSummaryManager | ( | ) |
Destructor.
Definition at line 178 of file RasterSummaryManager.cpp.
References te::common::FreeContents(), and m_rasterSummaries.
|
protected |
Constructor.
Definition at line 185 of file RasterSummaryManager.cpp.
| void te::rst::RasterSummaryManager::add | ( | const Raster * | raster, |
| RasterSummary * | summary | ||
| ) |
Adds a new entry in the summary manager.
| raster | The raster to be added. |
| summary | The raster summary of the respective raster. The manager will take its ownership. |
Definition at line 39 of file RasterSummaryManager.cpp.
References getConnInfoStr(), and m_rasterSummaries.
Referenced by get().
| const te::rst::RasterSummary * te::rst::RasterSummaryManager::find | ( | const Raster * | raster | ) | const |
It searches for a raster summary.
| raster | The raster to be found. |
Definition at line 50 of file RasterSummaryManager.cpp.
References getConnInfoStr(), and m_rasterSummaries.
| const te::rst::RasterSummary * te::rst::RasterSummaryManager::get | ( | const Raster * | raster, |
| const SummaryTypes | st, | ||
| bool | readall = false |
||
| ) |
It searches for a raster summary. If not found it creates the summary and returns it.
| raster | The raster to be found. |
| types | The desired types of summary to be calculated (min, max, ...). |
| readall | Force the reading the entire image (can be slow) for computing min and max values. |
Definition at line 69 of file RasterSummaryManager.cpp.
References add(), b, te::dt::DOUBLE_TYPE, te::dt::FLOAT_TYPE, te::rst::Raster::getBand(), getConnInfoStr(), te::rst::Band::getHistogramI(), te::rst::Band::getHistogramR(), te::rst::Band::getMaxValue(), te::rst::Band::getMeanValue(), te::rst::Band::getMinValue(), te::rst::Raster::getNumberOfBands(), te::rst::Band::getProperty(), te::rst::Band::getStdValue(), te::rst::BandProperty::getType(), te::rst::BandSummary::m_histogramI, te::rst::BandSummary::m_histogramR, te::rst::BandSummary::m_maxVal, te::rst::BandSummary::m_meanVal, te::rst::BandSummary::m_minVal, m_rasterSummaries, m_realValuesRasterHistSize, te::rst::BandSummary::m_stdVal, te::rst::SUMMARY_I_HISTOGRAM, te::rst::SUMMARY_MAX, te::rst::SUMMARY_MEAN, te::rst::SUMMARY_MIN, te::rst::SUMMARY_R_HISTOGRAM, and te::rst::SUMMARY_STD.
|
staticinherited |
It returns a reference to the singleton instance.
Referenced by te::qt::widgets::ClassifierWizard::buildLegend(), te::qt::widgets::createHistogram(), te::sa::CreateKernelColorMaping(), te::qt::widgets::RasterHistogramWidget::drawHistogram(), te::qt::widgets::ColorTransformDialog::drawPreview(), te::wms::WMSLayerRenderer::drawRaster(), te::qt::widgets::RasterNavigatorWidget::drawRaster(), te::map::DrawRaster(), te::rp::Contrast::execHistogramEqualizationContrast(), te::rp::Contrast::execSetMeanAndStdContrast(), te::attributefill::RasterToVector::getTexture(), te::qt::widgets::HistogramDataWidget::HistogramDataWidget(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), ReadPixelTool::mouseReleaseEvent(), te::rp::NormalizeRaster(), te::qt::widgets::SlicingColorMapWidget::onBandSelected(), te::qt::widgets::ColorMapWidget::onBandSelected(), te::qt::widgets::RasterSymbolizerWidget::onCalcRasterSummaryClicked(), te::qt::widgets::CloudDetectionDialog::onCloudBandComboBoxActivated(), te::qt::widgets::HistogramDataWidget::onPropertyComboBoxIndexChanged(), te::qt::widgets::CloudDetectionDialog::onSearchShadowLayerToolButtonClicked(), te::qt::widgets::CloudDetectionDialog::onShadowBandComboBoxActivated(), RasterInMemory(), te::qt::widgets::ColorTransformDialog::rgb2hlsRComboBoxActivated(), te::qt::widgets::ColorTransformDialog::rgbRComboBoxActivated(), te::qt::widgets::ContrastDialogForm::set(), te::qt::widgets::CloudDetectionDialog::setCloudBands(), and te::qt::widgets::CloudDetectionDialog::setShadowBands().
| const unsigned int te::rst::RasterSummaryManager::getRealValuesRasterHistSize | ( | ) | const |
Returns the current real values raster histogram size.
Definition at line 168 of file RasterSummaryManager.cpp.
References m_realValuesRasterHistSize.
| void te::rst::RasterSummaryManager::remove | ( | const Raster * | raster | ) |
Removes the summary from the specified raster.
| raster | The raster to remove the summary. |
Definition at line 62 of file RasterSummaryManager.cpp.
References getConnInfoStr(), and m_rasterSummaries.
| void te::rst::RasterSummaryManager::setRealValuesRasterHistSize | ( | const unsigned int | newSize | ) |
Set the real values raster histogram size.
Definition at line 173 of file RasterSummaryManager.cpp.
References m_realValuesRasterHistSize.
|
friend |
Definition at line 58 of file RasterSummaryManager.h.
|
private |
A map of rasters conn info and their respective summaries.
Definition at line 130 of file RasterSummaryManager.h.
Referenced by add(), find(), get(), remove(), and ~RasterSummaryManager().
|
private |
Real values raster histogram size (default:255).
Definition at line 128 of file RasterSummaryManager.h.
Referenced by get(), getRealValuesRasterHistSize(), and setRealValuesRasterHistSize().