te::rst::RasterSummaryManager Class Reference

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>

Inheritance diagram for te::rst::RasterSummaryManager:
te::common::Singleton< RasterSummaryManager >

Public Member Functions

void add (const Raster *raster, RasterSummary *summary)
 Adds a new entry in the summary manager. More...
 
const RasterSummaryfind (const Raster *raster) const
 It searches for a raster summary. More...
 
const RasterSummaryget (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 RasterSummaryManagergetInstance ()
 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 >
 

Detailed Description

A singleton for keeping raster summaries (most statistics). It stores an internal map of raster conn info str and their respective summaries.

See also
RasterSummary, BandSummary.

Definition at line 56 of file RasterSummaryManager.h.

Constructor & Destructor Documentation

◆ ~RasterSummaryManager()

te::rst::RasterSummaryManager::~RasterSummaryManager ( )

Destructor.

◆ RasterSummaryManager()

te::rst::RasterSummaryManager::RasterSummaryManager ( )
protected

Constructor.

Member Function Documentation

◆ add()

void te::rst::RasterSummaryManager::add ( const Raster raster,
RasterSummary summary 
)

Adds a new entry in the summary manager.

Parameters
rasterThe raster to be added.
summaryThe raster summary of the respective raster. The manager will take its ownership.
Note
If the raster was already added, the summary will be replaced.

◆ find()

const RasterSummary* te::rst::RasterSummaryManager::find ( const Raster raster) const

It searches for a raster summary.

Parameters
rasterThe raster to be found.
Returns
The calculated raster summary, or a null summary otherwise.

◆ get()

const 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.

Parameters
rasterThe raster to be found.
typesThe desired types of summary to be calculated (min, max, ...).
readallForce the reading the entire image (can be slow) for computing min and max values.
Returns
The calculated raster summary.

◆ getInstance()

RasterSummaryManager & te::common::Singleton< RasterSummaryManager >::getInstance ( )
inlinestaticinherited

It returns a reference to the singleton instance.

Returns
A reference to the singleton instance.

Definition at line 126 of file Singleton.h.

◆ getRealValuesRasterHistSize()

const unsigned int te::rst::RasterSummaryManager::getRealValuesRasterHistSize ( ) const

Returns the current real values raster histogram size.

Returns
Returns the current real values raster histogram size.
Note
Default value: 255.

◆ remove()

void te::rst::RasterSummaryManager::remove ( const Raster raster)

Removes the summary from the specified raster.

Parameters
rasterThe raster to remove the summary.

◆ setRealValuesRasterHistSize()

void te::rst::RasterSummaryManager::setRealValuesRasterHistSize ( const unsigned int  newSize)

Set the real values raster histogram size.

Returns
Returns the current real values raster histogram size.
Note
Default value: 255.

Friends And Related Function Documentation

◆ te::common::Singleton< RasterSummaryManager >

Definition at line 58 of file RasterSummaryManager.h.

Member Data Documentation

◆ m_rasterSummaries

std::map<std::string, RasterSummary*> te::rst::RasterSummaryManager::m_rasterSummaries
private

A map of rasters conn info and their respective summaries.

Definition at line 130 of file RasterSummaryManager.h.

◆ m_realValuesRasterHistSize

unsigned int te::rst::RasterSummaryManager::m_realValuesRasterHistSize
private

Real values raster histogram size (default:255).

Definition at line 128 of file RasterSummaryManager.h.


The documentation for this class was generated from the following file: