Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkHistogramStatisticsCalculator.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkHistogramStatisticsCalculator_h
14 #define mitkHistogramStatisticsCalculator_h
15 
17 #include <itkHistogram.h>
19 
20 
21 namespace mitk
22 {
40  {
41  public:
43  typedef double MeasurementType;
45  typedef itk::Statistics::Histogram<MeasurementType> HistogramType;
46 
49 
55  void SetHistogram(HistogramType::Pointer histogram);
56 
63 
70 
77 
84 
90 
91  protected:
92 
93  private:
94  HistogramType::Pointer m_Histogram;
95  MeasurementType m_Uniformity, m_UPP, m_Entropy, m_Median;
96  bool m_StatisticsCalculated;
97  };
98 }
99 
100 #endif
#define MITKIMAGESTATISTICS_EXPORT
Computes histogram-based statistics: Uniformity, UPP, Entropy, and Median.
void SetHistogram(HistogramType::Pointer histogram)
Set the histogram from which to compute statistics.
MeasurementType GetMedian()
Get the approximated median from the histogram.
MeasurementType GetUPP()
Get the Uniformity of Positive Pixels (UPP).
double MeasurementType
Measurement type used for histogram bins and statistics values.
MeasurementType GetUniformity()
Get the Uniformity of the histogram distribution.
void CalculateStatistics()
Compute all histogram statistics (Uniformity, UPP, Entropy, Median).
MeasurementType GetEntropy()
Get the Shannon entropy of the histogram distribution.
HistogramStatisticsCalculator()
Default constructor. Initializes all statistics to zero.
itk::Statistics::Histogram< MeasurementType > HistogramType
Histogram type used as input.
Find image slices visible on a given plane.