Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkImageStatisticsCalculationRunnable.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 QmitkImageStatisticsCalculationRunnable_h
13 #define QmitkImageStatisticsCalculationRunnable_h
14 
15 //mitk headers
16 #include "mitkImage.h"
17 #include "mitkPlanarFigure.h"
19 
21 
22 // itk headers
23 #ifndef __itkHistogram_h
24 #include <itkHistogram.h>
25 #endif
26 
28 
36 {
37  Q_OBJECT
38 public:
39 
40  typedef itk::Statistics::Histogram<double> HistogramType;
41 
48 
51  void Initialize(const mitk::Image* image, const mitk::Image* binaryImage, const mitk::PlanarFigure* planarFig);
54  mitk::ImageStatisticsContainer* GetStatisticsData() const;
55 
56  const mitk::Image* GetStatisticsImage() const;
57  const mitk::Image* GetMaskImage() const;
58  const mitk::PlanarFigure* GetPlanarFigure() const;
59 
62  void SetIgnoreZeroValueVoxel(bool _arg);
65  bool GetIgnoreZeroValueVoxel() const;
68  void SetHistogramNBins(unsigned int nbins);
71  unsigned int GetHistogramNBins() const;
72 
73  ResultMapType GetResults() const override;
74 
75 protected:
76  bool RunComputation() override;
77 
78 private:
79  mitk::Image::ConstPointer m_StatisticsImage;
80  mitk::Image::ConstPointer m_BinaryMask;
81  mitk::PlanarFigure::ConstPointer m_PlanarFigureMask;
82  mitk::ImageStatisticsContainer::Pointer m_StatisticsContainer;
83  bool m_IgnoreZeros;
84  unsigned int m_HistogramNBins;
85 };
86 #endif
QmitkImageStatisticsCalculationRunnable
Definition: QmitkImageStatisticsCalculationRunnable.h:35
mitkImage.h
mitk::PlanarFigure
Base-class for geometric planar (2D) figures, such as lines, circles, rectangles, polygons,...
Definition: mitkPlanarFigure.h:50
MitkImageStatisticsUIExports.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
QmitkDataGenerationJobBase.h
itk::SmartPointer< const Self >
mitkPlanarFigure.h
QmitkImageStatisticsCalculationRunnable::HistogramType
itk::Statistics::Histogram< double > HistogramType
Definition: QmitkImageStatisticsCalculationRunnable.h:40
mitk::ImageStatisticsContainer
Container class for storing a StatisticsObject for each timestep.
Definition: mitkImageStatisticsContainer.h:33
QmitkDataGenerationJobBase::RunComputation
virtual bool RunComputation()=0
MITKIMAGESTATISTICSUI_EXPORT
#define MITKIMAGESTATISTICSUI_EXPORT
Definition: MitkImageStatisticsUIExports.h:15
QmitkDataGenerationJobBase::GetResults
virtual ResultMapType GetResults() const =0
mitk::BaseData::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkBaseData.h:46
QmitkDataGenerationJobBase
QmitkDataGenerationJobBase Base class for generation jobs used by QmitkDataGenerationBase and derived...
Definition: QmitkDataGenerationJobBase.h:32
mitkImageStatisticsContainer.h
QmitkDataGenerationJobBase::ResultMapType
std::map< std::string, mitk::BaseData::Pointer > ResultMapType
Definition: QmitkDataGenerationJobBase.h:39