52 #ifndef __PCL_ImageStatistics_h
53 #define __PCL_ImageStatistics_h
128 double sumOfSquares = 0;
144 bool rejectLow =
false;
145 bool rejectHigh =
false;
146 bool noExtremes =
false;
148 bool noSumOfSquares =
false;
149 bool noVariance =
false;
150 bool noMedian =
false;
151 bool noAvgDev =
false;
178 (void)
operator =( x );
235 (void)
operator =( x );
269 return m_data.sumOfSquares;
278 return m_data.median;
287 return m_data.variance;
307 return m_data.stdDev;
318 return StandardDeviation();
332 return m_data.avgDev;
343 return AverageDeviation();
443 return m_data.minimum;
462 return m_data.minPos;
473 return MinimumPosition();
481 return m_data.maximum;
500 return m_data.maxPos;
511 return MaximumPosition();
546 m_data.low =
Range( low, 0.0, 1.0 );
547 m_data.high =
Range( high, 0.0, 1.0 );
548 if ( m_data.high < m_data.low )
562 return m_data.rejectLow;
575 return m_data.rejectHigh;
587 m_data.rejectLow = enableLow;
588 m_data.rejectHigh = enableHigh;
599 EnableRejection( !disableLow, !disableHigh );
608 return !m_data.noExtremes;
617 m_data.noExtremes = !enable;
626 m_data.noExtremes = disable;
638 return !m_data.noMean;
650 m_data.noMean = !enable;
662 m_data.noMean = disable;
671 return !m_data.noSumOfSquares;
679 m_data.noSumOfSquares = !enable;
687 m_data.noSumOfSquares = disable;
696 return !m_data.noVariance;
704 m_data.noVariance = !enable;
712 m_data.noVariance = disable;
724 return !m_data.noMedian;
735 m_data.noMedian = !enable;
746 m_data.noMedian = disable;
755 return !m_data.noAvgDev;
764 m_data.noAvgDev = !enable;
773 m_data.noAvgDev = disable;
785 return !m_data.noMAD;
797 m_data.noMAD = !enable;
809 m_data.noMAD = disable;
818 return !m_data.noBWMV;
827 m_data.noBWMV = !enable;
836 m_data.noBWMV = disable;
845 return !m_data.noPBMV;
854 m_data.noPBMV = !enable;
863 m_data.noPBMV = disable;
885 m_data.noSn = !enable;
896 m_data.noSn = disable;
918 m_data.noQn = !enable;
929 m_data.noQn = disable;
973 case 32: *this << static_cast<const Image&>( *image );
break;
974 case 64: *this << static_cast<const DImage&>( *image );
break;
979 case 8: *this << static_cast<const UInt8Image&>( *image );
break;
980 case 16: *this << static_cast<const UInt16Image&>( *image );
break;
981 case 32: *this << static_cast<const UInt32Image&>( *image );
break;
Implements a generic, two-dimensional, shared or local image.
A generic point in the two-dimensional space.
Descriptive image statistics.
void DisableQn(bool disable=true)
void EnableExtremes(bool enable=true)
ImageStatistics()=default
void EnableMean(bool enable=true)
Point MaximumPosition() const
bool IsPBMVEnabled() const
void DisableMAD(bool disable=true)
bool IsMADEnabled() const
void EnableMAD(bool enable=true)
bool IsMeanEnabled() const
void EnableQn(bool enable=true)
void DisableMean(bool disable=true)
void DisableVariance(bool disable=true)
Point MinimumPosition() const
bool IsHighRejectionEnabled() const
const Data & GetData() const
bool IsBWMVEnabled() const
~ImageStatistics() override
void DisablePBMV(bool disable=true)
void EnableMedian(bool enable=true)
void EnableSumOfSquares(bool enable=true)
bool IsLowRejectionEnabled() const
void EnableSn(bool enable=true)
void DisableRejection(bool disableLow=true, bool disableHigh=true)
bool IsMedianEnabled() const
double SumOfSquares() const
double BendMidvariance() const
void DisableSumOfSquares(bool disable=true)
bool IsAvgDevEnabled() const
void Assign(const ImageStatistics &x)
void DisableAvgDev(bool disable=true)
double RejectionLow() const
double AverageDeviation() const
double StandardDeviation() const
void EnableRejection(bool enableLow=true, bool enableHigh=true)
double BiweightMidvariance() const
void DisableBWMV(bool disable=true)
void DisableMedian(bool disable=true)
void EnableBWMV(bool enable=true)
bool IsSumOfSquaresEnabled() const
void SetRejectionLimits(double low, double high)
void EnableAvgDev(bool enable=true)
double RejectionHigh() const
void DisableExtremes(bool disable=true)
bool IsExtremesEnabled() const
void DisableSn(bool disable=true)
ImageStatistics(const ImageStatistics &)=default
void EnablePBMV(bool enable=true)
void EnableVariance(bool enable=true)
bool IsVarianceEnabled() const
Acts like a union for all types of images in PCL, with optional class-wide ownership of transported i...
bool IsFloatSample() const noexcept
bool IsComplexSample() const noexcept
int BitsPerSample() const noexcept
A process using multiple concurrent execution threads.
High-level interface to a PixInsight view object.
Array< T, A > & operator<<(Array< T, A > &x, const V &v)
void Swap(GenericPoint< T > &p1, GenericPoint< T > &p2) noexcept
double Qn(T *__restrict__ x, T *__restrict__ xn)
double MAD(const T *__restrict__ i, const T *__restrict__ j, double center)
double Variance(const T *__restrict__ i, const T *__restrict__ j, double center) noexcept
double Sn(T *__restrict__ x, T *__restrict__ xn)
constexpr const T & Range(const T &x, const T &a, const T &b) noexcept
Statistical data in the normalized [0,1] range.
double maximum
Maximum sample value.
double mean
Arithmetic mean.
double avgDev
Average deviation from the median.
Point minPos
Position of the minimum sample value.
double Sn
Sn scale estimator of Rousseeuw and Croux.
double Qn
Qn scale estimator of Rousseeuw and Croux.
double bwmv
Biweight midvariance.
double MAD
Median absolute deviation from the median.
void Assign(const Data &x)
double stdDev
Standard deviation (=Sqrt(variance)).
size_type count
Total number of evaluated samples.
void AssignStatisticalData(const Data &x)
double pbmv
Percentage bend midvariance.
double minimum
Minimum sample value.
double median
Median sample value.
double sumOfSquares
Sum of squared samples.
Point maxPos
Position of the maximum sample value.
double variance
Variance from the mean.
Data(const Data &)=default