diff --git a/Modules/ImageStatistics/mitkImageStatisticsContainer.h b/Modules/ImageStatistics/mitkImageStatisticsContainer.h index 6851ba3603..19fa778f6f 100644 --- a/Modules/ImageStatistics/mitkImageStatisticsContainer.h +++ b/Modules/ImageStatistics/mitkImageStatisticsContainer.h @@ -1,163 +1,161 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKIMAGESTATISTICSCONTAINER #define MITKIMAGESTATISTICSCONTAINER #include #include #include namespace mitk { /**Documentation @brief Container class for storing the computed image statistics. - Container class for storing the computed image statistics. Stored statistics are: + Stored statistics are: - N: number of voxels - Mean - MPP (Mean of positive pixels) - Median - Skewness - Kurtosis - Uniformity - UPP (Uniformity of positive pixels) - Std (Standard Deviation) - Min - Max - RMS (Root Mean Square) - Label (if applicable, the label (unsigned short) of the mask the statistics belong to) - Entropy - - It furthermore stores the following: - MinIndex (Index of Image where the Minimum is located) - MaxIndex (Index of Image where the Maximum is located) - Histogram of Pixel Values*/ class MITKIMAGESTATISTICS_EXPORT StatisticsContainer : public mitk::BaseData { public: mitkClassMacro(StatisticsContainer, mitk::BaseData) /** Method for creation through the object factory. */ itkNewMacro(Self) typedef itk::Statistics::Histogram HistogramType; typedef double RealType; typedef std::vector < std::pair > statisticsOrderedVectorType; virtual void SetRequestedRegionToLargestPossibleRegion() override {}; virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override { return false; }; virtual bool VerifyRequestedRegion() override { return true; }; virtual void SetRequestedRegion(const itk::DataObject*) override {}; /**Documentation - @brief Returns a std::map containing all real valued statistics stored in this class (= all statistics except minIndex, maxIndex and the histogram)*/ + @brief Returns a std::vector); itkGetConstMacro(MinIndex, vnl_vector); itkSetMacro(MaxIndex, vnl_vector); itkGetConstMacro(MaxIndex, vnl_vector); void SetHistogram(HistogramType::Pointer hist); itkGetConstMacro(Histogram, HistogramType::Pointer); itkSetMacro(Entropy, RealType); itkGetConstMacro(Entropy, RealType); itkSetMacro(Median, RealType); itkGetConstMacro(Median, RealType); itkSetMacro(Uniformity, RealType); itkGetConstMacro(Uniformity, RealType); itkSetMacro(UPP, RealType); itkGetConstMacro(UPP, RealType); /**Documentation @brief Creates a StatisticsMapType containing all real valued statistics stored in this class (= all statistics except minIndex, maxIndex and the histogram) and prints its contents to std::cout*/ void Print(); protected: StatisticsContainer(); virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override; private: itk::LightObject::Pointer InternalClone() const override; std::string convertToString(const vnl_vector& index) const; long m_N; RealType m_Volume; RealType m_Mean, m_Min, m_Max, m_Std; RealType m_Skewness; RealType m_Kurtosis; RealType m_RMS; RealType m_MPP; vnl_vector m_MinIndex, m_MaxIndex; RealType m_Median; RealType m_Uniformity; RealType m_UPP; RealType m_Entropy; unsigned int m_Label; HistogramType::Pointer m_Histogram; }; } #endif // MITKIMAGESTATISTICSCONTAINER