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... | |
void | remove (const Raster *raster) |
Removes the summary from the specified raster. 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... | |
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 146 of file RasterSummaryManager.cpp.
References te::common::FreeContents().
|
protected |
Constructor.
Definition at line 153 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 38 of file RasterSummaryManager.cpp.
References getConnInfoStr(), and m_rasterSummaries.
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 49 of file RasterSummaryManager.cpp.
References getConnInfoStr().
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 68 of file RasterSummaryManager.cpp.
References 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::getStdValue(), 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, 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::createHistogram(), te::sa::CreateKernelColorMaping(), te::wms::WMSLayerRenderer::drawRaster(), te::map::DrawRaster(), te::rp::Contrast::execHistogramEqualizationContrast(), te::rp::Contrast::execSetMeanAndStdContrast(), te::qt::widgets::HistogramDataWidget::HistogramDataWidget(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), te::qt::widgets::ColorMapWidget::onBandSelected(), and te::qt::widgets::HistogramDataWidget::onPropertyComboBoxIndexChanged().
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 61 of file RasterSummaryManager.cpp.
References getConnInfoStr().
|
friend |
Definition at line 58 of file RasterSummaryManager.h.
|
private |
A map of rasters conn info and their respective summaries.
Definition at line 110 of file RasterSummaryManager.h.
Referenced by add().