Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkToolReferenceDataSelectionBox.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 QmitkToolReferenceDataSelectionBox_h_Included
14 #define QmitkToolReferenceDataSelectionBox_h_Included
15 
16 #include "mitkDataStorage.h"
17 #include "mitkToolManager.h"
19 
20 #include <QVBoxLayout>
21 #include <QWidget>
22 
24 
41 {
42  Q_OBJECT
43 
44 public:
56  {
58  ListDataIfAnyToolMatches
59  };
60 
61  QmitkToolReferenceDataSelectionBox(QWidget *parent = nullptr);
63 
64  mitk::DataStorage *GetDataStorage();
65  void SetDataStorage(mitk::DataStorage &storage);
66 
68  void Initialize(mitk::DataStorage *);
69 
70  void UpdateDataDisplay();
71 
72  mitk::ToolManager *GetToolManager();
73  void SetToolManager(mitk::ToolManager &); // no nullptr pointer allowed here, a manager is required
74 
75  void OnToolManagerReferenceDataModified();
76 
85  void SetToolGroupsForFiltering(const std::string &groups);
86 
94  void SetDisplayMode(DisplayMode mode);
95 
96 signals:
97 
98  void ReferenceNodeSelected(const mitk::DataNode *);
99 
100 protected slots:
101 
102  void OnReferenceDataSelected(const mitk::DataNode *node);
103 
104  void EnsureOnlyReferenceImageIsVisibile();
105 
106 protected:
107  mitk::DataStorage::SetOfObjects::ConstPointer GetAllPossibleReferenceImages();
108 
109  mitk::NodePredicateBase::ConstPointer GetAllPossibleReferenceImagesPredicate();
110 
111  mitk::ToolManager::Pointer m_ToolManager;
112 
114 
116 
119 
120  QVBoxLayout *m_Layout;
121 };
122 
123 #endif
Data management class that handles &#39;was created by&#39; relations.
Displays all or a subset (defined by a predicate) of nodes of the Data Storage.
DisplayMode
What kind of items should be displayed.
Display the data selection of a ToolManager.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
#define MITKSEGMENTATIONUI_EXPORT
Manages and coordinates instances of mitk::Tool.