Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkToolWorkingDataSelectionBox.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 QmitkToolWorkingDataSelectionListBox_h_Included
14 #define QmitkToolWorkingDataSelectionListBox_h_Included
15 
16 // mmueller
18 #include <QListWidget>
19 
20 #include "mitkProperties.h"
21 #include "mitkToolManager.h"
22 
40 {
41  Q_OBJECT
42 
43 public:
55  {
57  ListDataIfAnyToolMatches
58  };
59 
60  QmitkToolWorkingDataSelectionBox(QWidget *parent = nullptr);
62 
63  mitk::DataStorage *GetDataStorage();
64  void SetDataStorage(mitk::DataStorage &storage);
65 
69  void UpdateDataDisplay();
70 
74  mitk::ToolManager *GetToolManager();
75 
79  void SetToolManager(mitk::ToolManager &); // no nullptr pointer allowed here, a manager is required
80 
86  mitk::ToolManager::DataVectorType GetAllNodes(bool onlyDerivedFromOriginal = true);
87 
94 
100  mitk::DataNode *GetSelectedNode();
101 
106  void OnToolManagerWorkingDataModified();
107 
112  void OnToolManagerReferenceDataModified();
113 
114 signals:
115 
116  void WorkingNodeSelected(const mitk::DataNode *);
117 
118 protected slots:
119 
120  void OnWorkingDataSelectionChanged();
121 
122 protected:
123  typedef std::map<QListWidgetItem *, mitk::DataNode *> ItemNodeMapType;
124 
125  mitk::ToolManager::Pointer m_ToolManager;
126 
127  ItemNodeMapType m_Node;
128 
130 
132 
134 
136 };
137 
138 #endif
Display the data selection of a ToolManager.
Data management class that handles &#39;was created by&#39; relations.
std::vector< DataNode * > DataVectorType
MITK_QT_APP QList< mitk::DataNode::Pointer > GetSelectedNodes(berry::IWorkbenchPartSite::Pointer workbenchPartSite)
std::map< QListWidgetItem *, mitk::DataNode * > ItemNodeMapType
DisplayMode
What kind of items should be displayed.
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
#define MITKSEGMENTATIONUI_EXPORT
Manages and coordinates instances of mitk::Tool.