Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 // QMITKSTATISTICSCALCULATOR_H
void SetDataStorage(mitk::DataStorage *dataStorage)
Data management class that handles &#39;was created by&#39; relations.
mitk::DataStorage::Pointer m_DataStorage
#define MITKSEMANTICRELATIONSUI_EXPORT
This class holds the data of each lesion in the lesion tree view. The data is the lesion itself with ...