Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkStatisticsCalculator.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 QmitkStatisticsCalculator_h
14 #define QmitkStatisticsCalculator_h
15 
16 // mitk semantic relations UI
18 
19 // mitk semantic relations module
20 #include <mitkLesionData.h>
21 #include <mitkSemanticTypes.h>
22 
23 // mitk core
24 #include <mitkDataStorage.h>
25 #include <mitkWeakPointer.h>
26 
27 // mitk image statistics ui module
29 
30 /*
31 * @brief This class provides functions to compute the lesion volume of a given lesion.
32 * A lesion can be defined by a specific segmentation at each control-point - information type pair.
33 * This segmentation and its parent image will be used inside the private 'GetSegmentationMaskVolume' function.
34 * This function in turn uses the image statistics module (the 'ImageStatisticsContainerManager') to retrieve
35 * the specific statistics values from a statistics node. However, if the statistics are not found,
36 * a new 'QmitkImageStatisticsCalculationJob' is started. If the job is finished and the statistics are calculated,
37 * a new statistics node is added to the data storage (or an existing statistics data node is updated).
38 */
40 {
41  Q_OBJECT
42 
43 public:
44 
46  ~QmitkStatisticsCalculator() override;
47 
48  void SetDataStorage(mitk::DataStorage* dataStorage) { m_DataStorage = dataStorage; }
55  void ComputeLesionVolume(mitk::LesionData& lesionData, const mitk::SemanticTypes::CaseID& caseID);
56 
57 private:
58 
64  double GetSegmentationMaskVolume(mitk::DataNode::Pointer imageNode, mitk::DataNode::Pointer segmentationNode);
65 
66  void OnStatisticsCalculationEnds();
67 
68  QmitkImageStatisticsCalculationJob* m_CalculationJob;
70  mitk::DataNode::Pointer m_ImageNode;
71  mitk::DataNode::Pointer m_SegmentationNode;
72  double m_MaskVolume;
73 
74 };
75 
76 #endif
MitkSemanticRelationsUIExports.h
MITKSEMANTICRELATIONSUI_EXPORT
#define MITKSEMANTICRELATIONSUI_EXPORT
Definition: MitkSemanticRelationsUIExports.h:15
mitkDataStorage.h
mitkSemanticTypes.h
itk::SmartPointer< Self >
QmitkStatisticsCalculator
Definition: QmitkStatisticsCalculator.h:39
mitkLesionData.h
QmitkStatisticsCalculator::SetDataStorage
void SetDataStorage(mitk::DataStorage *dataStorage)
Definition: QmitkStatisticsCalculator.h:48
QmitkImageStatisticsCalculationJob.h
mitk::SemanticTypes::CaseID
std::string CaseID
Definition: mitkSemanticTypes.h:34
QmitkImageStatisticsCalculationJob
Definition: QmitkImageStatisticsCalculationJob.h:36
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
mitk::LesionData
This class holds the data of each lesion in the lesion tree view. The data is the lesion itself with ...
Definition: mitkLesionData.h:36
mitkWeakPointer.h
mitk::WeakPointer< mitk::DataStorage >