Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
QmitkAbstractSemanticRelationsStorageModel.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 QmitkAbstractSemanticRelationsStorageModel_h
14
#define QmitkAbstractSemanticRelationsStorageModel_h
15
16
// mitk semantic relations UI
17
#include "
MitkSemanticRelationsUIExports.h
"
18
19
// semantic relations module
20
#include <
mitkISemanticRelationsObserver.h
>
21
#include <
mitkSemanticRelationsDataStorageAccess.h
>
22
#include <
mitkSemanticRelationsIntegration.h
>
23
#include <
mitkSemanticTypes.h
>
24
25
// qt widgets module
26
#include "
QmitkAbstractDataStorageModel.h
"
27
28
/*
29
* @brief The QmitkAbstractSemanticRelationsStorageModel is a subclass of 'QmitkAbstractDataStorageModel' and provides additional
30
* functionality to set and store a semantic relations instance, the current case ID and the current lesion.
31
*/
32
class
MITKSEMANTICRELATIONSUI_EXPORT
QmitkAbstractSemanticRelationsStorageModel
:
public
QmitkAbstractDataStorageModel
,
public
mitk::ISemanticRelationsObserver
33
{
34
Q_OBJECT
35
36
public
:
37
38
QmitkAbstractSemanticRelationsStorageModel
(QObject* parent =
nullptr
);
39
~
QmitkAbstractSemanticRelationsStorageModel
()
override
;
40
41
/*
42
* @brief Update this model with the data from the semantic relations,
43
* if the case ID is equal to the currently selected case ID of the table model.
44
*
45
* Overridden from 'ISemanticRelationsObserver'.
46
* In order for the Update-function to be called, this model has to be added as an observer of SemanticRelation
47
* (e.g. m_SemanticRelations->AddObserver(m_SemanticRelationsStorageModel);)
48
*
49
* @par caseID The current case ID to identify the currently active patient / case.
50
*/
51
void
Update
(
const
mitk::SemanticTypes::CaseID
& caseID)
override
;
52
58
void
SetCaseID(
const
mitk::SemanticTypes::CaseID
& caseID);
59
60
const
mitk::SemanticTypes::CaseID
&
GetCaseID
()
const
{
return
m_CaseID; }
66
void
SetLesion(
const
mitk::SemanticTypes::Lesion
& lesion);
67
68
const
mitk::SemanticTypes::Lesion
&
GetLesion
()
const
{
return
m_Lesion; }
75
void
SetDataNodeSelection(
const
QList<mitk::DataNode::Pointer>& dataNodeSelection);
76
77
const
QList<mitk::DataNode::Pointer>&
GetSelectedDataNodes
()
const
{
return
m_SelectedDataNodes; };
78
/*
79
* @brief Update the semantic relations storage model with the current data from the semantic relations model
80
* and the current case ID.
81
*/
82
void
UpdateModelData();
83
84
Q_SIGNALS:
85
void
ModelUpdated();
86
87
protected
:
88
94
void
DataStorageChanged
()
override
;
95
101
virtual
void
SetData() = 0;
102
103
std::unique_ptr<mitk::SemanticRelationsDataStorageAccess>
m_SemanticRelationsDataStorageAccess
;
104
std::unique_ptr<mitk::SemanticRelationsIntegration>
m_SemanticRelationsIntegration
;
105
106
mitk::SemanticTypes::CaseID
m_CaseID
;
107
QList<mitk::DataNode::Pointer>
m_SelectedDataNodes
;
108
mitk::SemanticTypes::Lesion
m_Lesion
;
109
};
110
111
#endif
QmitkAbstractSemanticRelationsStorageModel::m_SemanticRelationsDataStorageAccess
std::unique_ptr< mitk::SemanticRelationsDataStorageAccess > m_SemanticRelationsDataStorageAccess
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:103
QmitkAbstractDataStorageModel::DataStorageChanged
virtual void DataStorageChanged()=0
MitkSemanticRelationsUIExports.h
mitkSemanticRelationsIntegration.h
MITKSEMANTICRELATIONSUI_EXPORT
#define MITKSEMANTICRELATIONSUI_EXPORT
Definition:
MitkSemanticRelationsUIExports.h:15
QmitkAbstractSemanticRelationsStorageModel::GetCaseID
const mitk::SemanticTypes::CaseID & GetCaseID() const
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:60
mitkSemanticTypes.h
QmitkAbstractSemanticRelationsStorageModel::GetSelectedDataNodes
const QList< mitk::DataNode::Pointer > & GetSelectedDataNodes() const
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:77
QmitkAbstractSemanticRelationsStorageModel::m_SemanticRelationsIntegration
std::unique_ptr< mitk::SemanticRelationsIntegration > m_SemanticRelationsIntegration
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:104
QmitkAbstractSemanticRelationsStorageModel::m_Lesion
mitk::SemanticTypes::Lesion m_Lesion
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:108
mitk::SemanticTypes::Lesion
Definition:
mitkSemanticTypes.h:108
QmitkAbstractSemanticRelationsStorageModel::m_CaseID
mitk::SemanticTypes::CaseID m_CaseID
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:106
QmitkAbstractDataStorageModel.h
mitk::SemanticTypes::CaseID
std::string CaseID
Definition:
mitkSemanticTypes.h:34
mitk::ISemanticRelationsObserver::Update
virtual void Update(const mitk::SemanticTypes::CaseID &caseID)=0
mitkISemanticRelationsObserver.h
QmitkAbstractSemanticRelationsStorageModel
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:32
mitkSemanticRelationsDataStorageAccess.h
QmitkAbstractSemanticRelationsStorageModel::m_SelectedDataNodes
QList< mitk::DataNode::Pointer > m_SelectedDataNodes
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:107
QmitkAbstractDataStorageModel
Definition:
QmitkAbstractDataStorageModel.h:40
mitk::ISemanticRelationsObserver
Definition:
mitkISemanticRelationsObserver.h:24
QmitkAbstractSemanticRelationsStorageModel::GetLesion
const mitk::SemanticTypes::Lesion & GetLesion() const
Definition:
QmitkAbstractSemanticRelationsStorageModel.h:68
src
MITK
Modules
SemanticRelationsUI
include
QmitkAbstractSemanticRelationsStorageModel.h
Generated on Wed May 17 2023 16:26:13 for Medical Imaging Interaction Toolkit by
1.8.17