Statistics Class Reference

Statistics for raster elements. More...

#include <Statistics.h>

Inheritance diagram for Statistics:

Inheritance graph

List of all members.

Public Member Functions

virtual void setMin (double dMin)=0
virtual void setMin (double dMin, ComplexComponent component)=0
virtual double getMin ()=0
virtual double getMin (ComplexComponent component)=0
virtual void setMax (double dMax)=0
virtual void setMax (double dMax, ComplexComponent component)=0
virtual double getMax ()=0
virtual double getMax (ComplexComponent component)=0
virtual void setAverage (double dAverage)=0
virtual void setAverage (double dAverage, ComplexComponent component)=0
virtual double getAverage ()=0
virtual double getAverage (ComplexComponent component)=0
virtual void setStandardDeviation (double dStdDev)=0
virtual void setStandardDeviation (double dStdDev, ComplexComponent component)=0
virtual double getStandardDeviation ()=0
virtual double getStandardDeviation (ComplexComponent component)=0
virtual void setPercentiles (const double *pPercentiles)=0
virtual void setPercentiles (const double *pPercentiles, ComplexComponent component)=0
virtual const double * getPercentiles ()=0
virtual const double * getPercentiles (ComplexComponent component)=0
virtual void setHistogram (const double *pBinCenters, const unsigned int *pHistogramCounts)=0
virtual void setHistogram (const double *pBinCenters, const unsigned int *pHistogramCounts, ComplexComponent component)=0
virtual void getHistogram (const double *&pBinCenters, const unsigned int *&pHistogramCounts)=0
virtual void getHistogram (const double *&pBinCenters, const unsigned int *&pHistogramCounts, ComplexComponent component)=0
virtual void setStatisticsResolution (int resolution)=0
virtual int getStatisticsResolution () const =0
virtual void setBadValues (const std::vector< int > &badValues)=0
virtual const std::vector< int > & getBadValues () const =0
virtual bool areStatisticsCalculated () const =0
virtual bool areStatisticsCalculated (ComplexComponent component) const =0

Protected Member Functions

virtual ~Statistics ()


Detailed Description

Statistics for raster elements.

The Statistics class is used to maintain the information specific for a spatial dimension of a data set. A separate Statistics object is available for each band of a RasterElement object.

The data used in the calculation of the statistics is set automatically by the RasterElement. The values are not calculated until one of the get methods are called. If the specific statistics values for the data are known, the set methods can be called to avoid calculating the values, which could take some time. All values in the object need to be set to avoid calculations when calling one of the get methods. Typically the values would only be directly set by an importer.

Warning:
Be careful when dealing with RasterElements that have NaN(Not a number) values. Before doing anything with the dataset, be sure to sanitize the data first. Failure to do this may lead to Opticks crashing when you attempt to calculate the statistics.
See also:
RasterElement::getStatistics()

Definition at line 40 of file Statistics.h.


Constructor & Destructor Documentation

virtual Statistics::~Statistics (  )  [protected, virtual]

A plug-in cannot create this object, it can only retrieve an already existing object from RasterElement::getStatistics and the RasterElement will manage any instances of this object.

Definition at line 408 of file Statistics.h.


Member Function Documentation

virtual void Statistics::setMin ( double  dMin  )  [pure virtual]

Sets the minimum value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dMin The minimum value for the data.

virtual void Statistics::setMin ( double  dMin,
ComplexComponent  component 
) [pure virtual]

Sets the minimum value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dMin The minimum value for the data.
component The complex data component represented by the given minimum.

virtual double Statistics::getMin (  )  [pure virtual]

Returns the minimum value for the data.

Returns:
The minimum value detected in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual double Statistics::getMin ( ComplexComponent  component  )  [pure virtual]

Returns the minimum value for the data.

Parameters:
component The complex data component for which to get its minimum value.
Returns:
The minimum value detected in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual void Statistics::setMax ( double  dMax  )  [pure virtual]

Sets the maximum value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dMax The maximum value for the data.

virtual void Statistics::setMax ( double  dMax,
ComplexComponent  component 
) [pure virtual]

Sets the maximum value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dMax The maximum value for the data.
component The complex data component represented by the given maximum.

virtual double Statistics::getMax (  )  [pure virtual]

Returns the maximum value for the data.

Returns:
The maximum value detected in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual double Statistics::getMax ( ComplexComponent  component  )  [pure virtual]

Returns the maximum value for the data.

Parameters:
component The complex data component for which to get its maximum value.
Returns:
The maximum value detected in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual void Statistics::setAverage ( double  dAverage  )  [pure virtual]

Sets the average value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dAverage The average value for the data.

virtual void Statistics::setAverage ( double  dAverage,
ComplexComponent  component 
) [pure virtual]

Sets the average value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dAverage The average value for the data.
component The complex data component represented by the given average.

virtual double Statistics::getAverage (  )  [pure virtual]

Returns the average value for the data.

Returns:
The average of all values in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual double Statistics::getAverage ( ComplexComponent  component  )  [pure virtual]

Returns the average value for the data.

Parameters:
component The complex data component for which to get its average value.
Returns:
The average of all values in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual void Statistics::setStandardDeviation ( double  dStdDev  )  [pure virtual]

Sets the standard deviation value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dStdDev The standard deviation value for the data.

virtual void Statistics::setStandardDeviation ( double  dStdDev,
ComplexComponent  component 
) [pure virtual]

Sets the standard deviation value for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
dStdDev The standard deviation value for the data.
component The complex data component represented by the given standard deviation.

virtual double Statistics::getStandardDeviation (  )  [pure virtual]

Returns the standard deviation value for the data.

Returns:
The standard deviation of all values in the band, or -99999.9 if the statistics could not be calculated successfully.

virtual double Statistics::getStandardDeviation ( ComplexComponent  component  )  [pure virtual]

Returns the standard deviation value for the data.

Parameters:
component The complex data component for which to get its standard deviation value.
Returns:
The standard deviation of all values in the data, or -99999.9 if the statistics could not be calculated successfully.

virtual void Statistics::setPercentiles ( const double *  pPercentiles  )  [pure virtual]

Sets the percentile values for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
pPercentiles The percentile values for the data.

virtual void Statistics::setPercentiles ( const double *  pPercentiles,
ComplexComponent  component 
) [pure virtual]

Sets the percentile values for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
pPercentiles The percentile values for the data.
component The complex data component represented by the given percentiles.

virtual const double* Statistics::getPercentiles (  )  [pure virtual]

Returns the percentile boundaries for the data.

Returns:
An array of 1001 values that contain the percentile boundaries for this band, or NULL if the statistics could not be calculated successfully.

virtual const double* Statistics::getPercentiles ( ComplexComponent  component  )  [pure virtual]

Returns the percentile boundaries for the data.

Parameters:
component The complex data component for which to get its percentile values.
Returns:
An array of 1001 values that contain the percentile boundaries for the data, or NULL if the statistics could not be calculated successfully.

virtual void Statistics::setHistogram ( const double *  pBinCenters,
const unsigned int *  pHistogramCounts 
) [pure virtual]

Sets the histogram values for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
pBinCenters The bin center values for the histogram.
pHistogramCounts The histogram values for the data.

virtual void Statistics::setHistogram ( const double *  pBinCenters,
const unsigned int *  pHistogramCounts,
ComplexComponent  component 
) [pure virtual]

Sets the histogram values for the data.

Calling this method and the set methods for the other statistics values, calculations will not be performed when calling the get methods, which could save some time.

Parameters:
pBinCenters The bin center values for the histogram.
pHistogramCounts The histogram values for the data.
component The complex data component represented by the given histogram.

virtual void Statistics::getHistogram ( const double *&  pBinCenters,
const unsigned int *&  pHistogramCounts 
) [pure virtual]

Returns the histogram values for the data.

Parameters:
pBinCenters Populated with an array of 256 values that specify the center location of the histogram bins. This value is set to NULL if the histogram cannot be computed successfully.
pHistogramCounts Populated with an array of 256 values that specify the number of values contained in each histogram bin. This value is set to NULL if the histogram cannot be computed successfully.

virtual void Statistics::getHistogram ( const double *&  pBinCenters,
const unsigned int *&  pHistogramCounts,
ComplexComponent  component 
) [pure virtual]

Returns the histogram values for the data.

Parameters:
pBinCenters Populated with an array of 256 values that specify the center location of the histogram bins. This value is set to NULL if the histogram cannot be computed successfully.
pHistogramCounts Populated with an array of 256 values that specify the number of values contained in each histogram bin. This value is set to NULL if the histogram cannot be computed successfully.
component The complex data component for which to get its histogram values.

virtual void Statistics::setStatisticsResolution ( int  resolution  )  [pure virtual]

Sets the step size used when computing the statistics for the data.

This method sets the number of rows and columns that will be stepped over while looping through the data to compute the statistics.

Parameters:
resolution The step size for the data. Must be at least 1.

virtual int Statistics::getStatisticsResolution (  )  const [pure virtual]

Gets the step size used when computing the statistics for the data.

This method gets the number of rows and columns that will be stepped over while looping through the data to compute the statistics.

Returns:
The step size for the data. Will be at least 1.

virtual void Statistics::setBadValues ( const std::vector< int > &  badValues  )  [pure virtual]

Sets values that will be excluded from statistics computation.

Certain layers (e.g. ThresholdLayer) also take these values into account.

This method is intended to be used to change the bad values in an existing RasterElement. To set the initial bad values that should be used to populate a RasterElement when it is created, use the RasterDataDescriptor::setBadValues() method instead.

Parameters:
badValues The values that should be ignored when computing statistics.

virtual const std::vector<int>& Statistics::getBadValues (  )  const [pure virtual]

Gets the values that will be excluded from statistics computation.

These values will always be sorted.

Returns:
The values that should be ignored when computing statistics.

virtual bool Statistics::areStatisticsCalculated (  )  const [pure virtual]

Queries whether the statistics have been calculated for the data.

Returns:
Returns true if the statistics have been calculated; otherwise returns false.

virtual bool Statistics::areStatisticsCalculated ( ComplexComponent  component  )  const [pure virtual]

Queries whether the complex data statistics have been calculated for the data.

Parameters:
component The complex data component for which to query its statistics.
Returns:
Returns true if the statistics have been calculated; otherwise returns false.


Software Development Kit - Opticks 4.9.0 Build 16218