Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkImageStatisticsCalculationJob.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 #ifndef QmitkImageStatisticsCalculationJob_h
13 #define QmitkImageStatisticsCalculationJob_h
14 
15 //QT headers
16 #include <QThread>
17 
18 
19 //mitk headers
20 #include "mitkImage.h"
21 #include "mitkPlanarFigure.h"
24 
25 // itk headers
26 #ifndef __itkHistogram_h
27 #include <itkHistogram.h>
28 #endif
29 
30 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  typedef itk::Statistics::Histogram<double> HistogramType;
43 
50 
53  void Initialize(const mitk::Image* image, const mitk::Image* binaryImage, const mitk::PlanarFigure* planarFig );
56  mitk::ImageStatisticsContainer* GetStatisticsData() const;
57 
58  const mitk::Image* GetStatisticsImage() const;
59  const mitk::Image* GetMaskImage() const;
60  const mitk::PlanarFigure* GetPlanarFigure() const;
61 
64  void SetIgnoreZeroValueVoxel( bool _arg );
67  bool GetIgnoreZeroValueVoxel() const;
70  void SetHistogramNBins( unsigned int nbins);
73  unsigned int GetHistogramNBins() const;
76  const HistogramType* GetTimeStepHistogram(unsigned int t = 0) const;
77 
80  bool GetStatisticsUpdateSuccessFlag() const;
83  void run() override;
84 
85  std::string GetLastErrorMessage() const;
86 
87 private:
88  mitk::Image::ConstPointer m_StatisticsImage;
89  mitk::Image::ConstPointer m_BinaryMask;
90  mitk::PlanarFigure::ConstPointer m_PlanarFigureMask;
91  mitk::ImageStatisticsContainer::Pointer m_StatisticsContainer;
92  bool m_IgnoreZeros;
93  unsigned int m_HistogramNBins;
94  bool m_CalculationSuccessful;
95  std::vector<HistogramType::ConstPointer> m_HistogramVector;
96  std::string m_message;
97 };
98 #endif
mitkImage.h
mitk::PlanarFigure
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Definition: mitkPlanarFigure.h:50
MitkImageStatisticsUIExports.h
QmitkImageStatisticsCalculationJob::HistogramType
itk::Statistics::Histogram< double > HistogramType
Definition: QmitkImageStatisticsCalculationJob.h:42
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< const Self >
mitkPlanarFigure.h
mitk::ImageStatisticsContainer
Container class for storing a StatisticsObject for each timestep.
Definition: mitkImageStatisticsContainer.h:33
MITKIMAGESTATISTICSUI_EXPORT
#define MITKIMAGESTATISTICSUI_EXPORT
Definition: MitkImageStatisticsUIExports.h:15
QmitkImageStatisticsCalculationJob
Definition: QmitkImageStatisticsCalculationJob.h:36
mitk::BaseData::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkBaseData.h:46
mitkImageStatisticsContainer.h