1 #ifndef MITKIMAGESTATISTICSCALCULATOR
2 #define MITKIMAGESTATISTICSCALCULATOR
10 #include <itkSmartPointer.h>
27 itkTypeMacro(ImageStatisticsCalculator_v2,
itk::Object)
77 statisticsMapType GetStatisticsAsMap();
105 m_Variance = variance;
155 m_Skewness = skewness;
165 m_Kurtosis = kurtosis;
195 m_minIndex = minIndex;
205 m_maxIndex = maxIndex;
215 if (m_Histogram != hist)
248 m_Uniformity = uniformity;
272 std::string GetAsString();
282 Self::Pointer rval =
dynamic_cast<Self*
>(ioPtr.GetPointer());
285 itkExceptionMacro(<<
"downcast to type "
286 <<
"StatisticsContainer"
290 rval->SetEntropy(this->GetEntropy());
291 rval->SetKurtosis(this->GetKurtosis());
292 rval->SetLabel(this->GetLabel());
293 rval->SetMax(this->GetMax());
294 rval->SetMin(this->GetMin());
295 rval->SetMean(this->GetMean());
296 rval->SetMedian(this->GetMedian());
297 rval->SetMPP(this->GetMPP());
298 rval->SetN(this->GetN());
299 rval->SetRMS(this->GetRMS());
300 rval->SetSkewness(this->GetSkewness());
301 rval->SetStd(this->GetStd());
302 rval->SetUniformity(this->GetUniformity());
303 rval->SetUPP(this->GetUPP());
304 rval->SetVariance(this->GetVariance());
305 rval->SetHistogram(this->GetHistogram());
306 rval->SetMinIndex(this->GetMinIndex());
307 rval->SetMaxIndex(this->GetMaxIndex());
313 RealType m_Mean, m_Min, m_Max, m_Std, m_Variance;
318 vnl_vector<int> m_minIndex, m_maxIndex;
320 RealType m_Uniformity;
323 unsigned int m_Label;
343 void SetNBinsForHistogramStatistics(
unsigned int nBins);
348 unsigned int GetNBinsForHistogramStatistics()
const;
352 void SetBinSizeForHistogramStatistics(
double binSize);
357 double GetBinSizeForHistogramStatistics()
const;
367 m_nBinsForHistogramStatistics = 100;
368 m_binSizeForHistogramStatistics = 10;
369 m_UseBinSizeOverNBins =
false;
374 template <
typename TPixel,
unsigned int VImageDimension >
void InternalCalculateStatisticsUnmasked(
375 typename itk::Image< TPixel, VImageDimension >* image,
376 unsigned int timeStep);
378 template <
typename TPixel,
unsigned int VImageDimension >
typename HistogramType::Pointer InternalCalculateHistogramUnmasked(
379 typename itk::Image< TPixel, VImageDimension >* image,
383 template <
typename TPixel,
unsigned int VImageDimension >
void InternalCalculateStatisticsMasked(
384 typename itk::Image< TPixel, VImageDimension >* image,
385 unsigned int timeStep);
387 bool IsUpdateRequired(
unsigned int timeStep)
const;
389 std::string GetNameOfClass()
391 return std::string(
"ImageStatisticsCalculator_v2");
404 unsigned int m_nBinsForHistogramStatistics;
405 double m_binSizeForHistogramStatistics;
406 bool m_UseBinSizeOverNBins;
408 std::vector<std::vector<StatisticsContainer::Pointer>> m_StatisticsByTimeStep;
409 std::vector<unsigned long> m_StatisticsUpdateTimePerTimeStep;
413 #endif // MITKIMAGESTATISTICSCALCULATOR
const RealType & GetStd() const
unsigned short MaskPixelType
void SetUPP(RealType upp)
itk::SmartPointer< Self > Pointer
itk::SmartPointer< Self > Pointer
void SetMin(RealType minVal)
void SetMedian(RealType median)
const RealType & GetMedian() const
const HistogramType::Pointer GetHistogram() const
itk::SmartPointer< const Self > ConstPointer
const unsigned int & GetLabel() const
void SetStd(RealType std)
const RealType & GetMean() const
DataCollection - Class to facilitate loading/accessing structured data.
void SetMean(RealType mean)
itk::SmartPointer< Self > Pointer
Class for common statistics, includig hotspot properties.
const RealType & GetMPP() const
const RealType & GetMin() const
const RealType & GetEntropy() const
#define MITKIMAGESTATISTICS_EXPORT
itk::Statistics::Histogram< double > HistogramType
void SetHistogram(HistogramType::Pointer hist)
void SetVariance(RealType variance)
const long & GetN() const
Class for calculating statistics and histogram for an (optionally masked) image.
vnl_vector< int > GetMaxIndex() const
const RealType & GetUniformity() const
void SetMax(RealType maxVal)
Container class for storing the computed image statistics.
void SetSkewness(RealType skewness)
void SetLabel(unsigned int label)
void SetKurtosis(RealType kurtosis)
const RealType & GetUPP() const
vnl_vector< int > GetMinIndex() const
void SetEntropy(RealType entropy)
void SetRMS(RealType rms)
std::map< std::string, statisticsValueType > statisticsMapType
const RealType & GetRMS() const
const RealType & GetMax() const
ImageStatisticsCalculator Self
ImageStatisticsCalculator()
const RealType & GetKurtosis() const
itk::SmartPointer< const Self > ConstPointer
const RealType & GetVariance() const
void SetUniformity(RealType uniformity)
void SetMaxIndex(vnl_vector< int > maxIndex)
const RealType & GetSkewness() const
double statisticsValueType
void SetMPP(RealType mpp)
void SetMinIndex(vnl_vector< int > minIndex)