Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
old/mitkExtendedLabelStatisticsImageFilter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 #ifndef __mitkExtendedLabelStatisticsImageFilter_h
17 #define __mitkExtendedLabelStatisticsImageFilter_h
18 
19 #include "itkLabelStatisticsImageFilter.h"
20 
21 namespace itk
22 {
38  template< class TInputImage, class TLabelImage >
39  class ExtendedLabelStatisticsImageFilter : public LabelStatisticsImageFilter< TInputImage, TLabelImage >
40  {
41  public:
42 
44  typedef LabelStatisticsImageFilter < TInputImage, TLabelImage > Superclass;
47  typedef typename Superclass::LabelPixelType LabelPixelType;
48  typedef typename Superclass::RealType RealType;
49  typedef typename Superclass::PixelType PixelType;
50  typedef typename Superclass::MapIterator MapIterator;
51  typedef itk::Statistics::Histogram<double> HistogramType;
52 
53  itkFactorylessNewMacro( Self );
54  itkCloneMacro( Self );
55  itkTypeMacro(ExtendedLabelStatisticsImageFilter, LabelStatisticsImageFilter);
56 
61  {
62  public:
63 
65  {
66  m_Kurtosis = 0.0;
67  m_Skewness = 0.0;
68  m_Entropy = -1.0;
69  m_Uniformity = 0.0;
70  m_MPP = 0.0;
71  m_UPP = 0.0;
72  };
73 
75 
76  /* the new member coefficients*/
77  RealType m_Kurtosis;
78  RealType m_Skewness;
79  RealType m_Entropy;
80  RealType m_Uniformity;
81  RealType m_MPP;
82  RealType m_UPP;
83  };
84 
85 
86  /*getter method for the new coefficients*/
87  RealType GetSkewness(LabelPixelType label) const;
88  RealType GetKurtosis(LabelPixelType label) const;
89  RealType GetUniformity( LabelPixelType label) const;
90  RealType GetEntropy( LabelPixelType label) const;
91  RealType GetMPP( LabelPixelType label) const;
92  RealType GetUPP( LabelPixelType label) const;
93 
94  std::list< int> GetRelevantLabels() const;
95  bool GetMaskingNonEmpty() const;
96 
97  protected:
98 
99  typedef std::map< LabelPixelType, CoefficientsClass > CoefficientsMap;
100  typedef typename CoefficientsMap::const_iterator CoefficientsMapConstIterator;
101 
103 
105 
115 
116  private:
117 
118  CoefficientsMap m_LabelStatisticsCoefficients;
119  std::list< int> m_RelevantLabels;
120  bool m_MaskNonEmpty;
121 
122  }; // end of class
123 
124 } // end namespace itk
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
127 #include "mitkExtendedLabelStatisticsImageFilter.hxx"
128 #endif
129 
130 #endif
std::list< int > GetRelevantLabels() const
RealType GetUniformity(LabelPixelType label) const
RealType GetMPP(LabelPixelType label) const
RealType GetUPP(LabelPixelType label) const
Extension of the itkLabelStatisticsImageFilter that also calculates the Skewness,Kurtosis,Entropy,Uniformity.
RealType GetKurtosis(LabelPixelType label) const
Internal class which stores the calculated coefficients Skewness,Kurtosis,Uniformity,UPP,MPP,Entropy.
RealType GetEntropy(LabelPixelType label) const
std::map< LabelPixelType, CoefficientsClass > CoefficientsMap
RealType GetSkewness(LabelPixelType label) const
void ComputeSkewnessKurtosisAndMPP()
ComputeSkewnessKurtosisAndMPP(),ComputeEntropyUniformityAndUPP() will be called after superclass both...
unsigned short PixelType
LabelStatisticsImageFilter< TInputImage, TLabelImage > Superclass