15#include "SpecialPixel.h"
19class QXmlStreamWriter;
20class QXmlStreamReader;
98 void readStatistics(QXmlStreamReader *xmlReader);
107 void AddData(
const double *data,
const unsigned int count);
108 void AddData(
const double data);
110 void RemoveData(
const double *data,
const unsigned int count);
116 double ValidMinimum()
const;
117 double ValidMaximum()
const;
118 bool InRange(
const double value);
119 bool AboveRange(
const double value);
120 bool BelowRange(
const double value);
133 double BestMinimum(
const double percent = 99.5)
const;
134 double BestMaximum(
const double percent = 99.5)
const;
135 double ZScore(
const double value)
const;
147 bool RemovedData()
const;
151 void save(QXmlStreamWriter &stream,
const Project *project)
const;
154 QDataStream &
write(QDataStream &stream)
const;
155 QDataStream &read(QDataStream &stream);
The main project for ipce.
Contains multiple PvlContainers.
This class is used to accumulate statistics on double arrays.
BigInt m_hisPixels
Count of high instrument representation pixels processed.
BigInt NullPixels() const
Returns the total number of NULL pixels encountered.
double m_sum
The sum accumulator, i.e. the sum of added data values.
BigInt OverRangePixels() const
Returns the total number of pixels over the valid range encountered.
bool m_removedData
Indicates the RemoveData method was called which implies m_minimum and m_maximum are invalid.
double ChebyshevMinimum(const double percent=99.5) const
This method returns a minimum such that X percent of the data will fall with K standard deviations of...
BigInt m_validPixels
Count of valid pixels (non-special) processed.
double Sum() const
Returns the sum of all the data.
BigInt UnderRangePixels() const
Returns the total number of pixels under the valid range encountered.
double Average() const
Computes and returns the average.
BigInt LisPixels() const
Returns the total number of low instrument saturation (LIS) pixels encountered.
virtual ~Statistics()
Destroys the IsisStats object.
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
BigInt HrsPixels() const
Returns the total number of high representation saturation (HRS) pixels encountered.
BigInt HisPixels() const
Returns the total number of high instrument saturation (HIS) pixels encountered.
double m_validMinimum
Minimum valid pixel value.
double BestMinimum(const double percent=99.5) const
This method returns the better of the absolute minimum or the Chebyshev minimum.
BigInt m_lisPixels
Count of low representation saturation pixels processed.
BigInt OutOfRangePixels() const
Returns the total number of pixels outside of the valid range encountered.
BigInt m_nullPixels
Count of null pixels processed.
BigInt ValidPixels() const
Returns the total number of valid pixels processed.
double ChebyshevMaximum(const double percent=99.5) const
This method returns a maximum such that X percent of the data will fall with K standard deviations of...
double ZScore(const double value) const
This method returns the better of the z-score of the given value.
BigInt m_totalPixels
Count of total pixels processed.
BigInt m_lrsPixels
Count of low instrument saturation pixels processed.
double SumSquare() const
Returns the sum of all the squared data.
BigInt TotalPixels() const
Returns the total number of pixels processed (valid and invalid).
QDataStream & write(QDataStream &stream) const
Order saved must match the offsets in the static compoundH5DataType() method.
PvlGroup toPvl(QString name="Statistics") const
Serialize statistics as a pvl group.
double m_minimum
Minimum double value encountered.
double m_maximum
Maximum double value encountered.
double m_validMaximum
Maximum valid pixel value.
void AddData(const double *data, const unsigned int count)
Add an array of doubles to the accumulators and counters.
double Rms() const
Computes and returns the rms.
double BestMaximum(const double percent=99.5) const
This method returns the better of the absolute maximum or the Chebyshev maximum.
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
BigInt LrsPixels() const
Returns the total number of low representation saturation (LRS) pixels encountered.
void fromPvl(const PvlGroup &inStats)
Unserializes a Statistics object from a pvl group.
void RemoveData(const double *data, const unsigned int count)
Remove an array of doubles from the accumulators and counters.
double StandardDeviation() const
Computes and returns the standard deviation.
double Variance() const
Computes and returns the variance.
BigInt m_underRangePixels
Count of pixels less than the valid range.
BigInt m_hrsPixels
Count of high instrument saturation pixels processed.
BigInt m_overRangePixels
Count of pixels greater than the valid range.
Statistics(QObject *parent=0)
Constructs an IsisStats object with accumulators and counters set to zero.
void Reset()
Reset all accumulators and counters to zero.
double m_sumsum
The sum-squared accumulator, i.e.
This is free and unencumbered software released into the public domain.
const double ValidMaximum
The maximum valid double value for Isis pixels.
long long int BigInt
Big int.
const double ValidMinimum
The minimum valid double value for Isis pixels.
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.