Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
Medical Imaging Interaction Toolkit
QmitkNavigationToolCreationWidget.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 QmitkNavigationToolCreationWidget_H
14 #define QmitkNavigationToolCreationWidget_H
15 
16 //QT headers
17 #include <QWidget>
18 
19 //mitk headers
20 #include "MitkIGTUIExports.h"
21 #include <mitkNavigationTool.h>
25 
26 #include <QDialog>
27 
28 //Microservices
29 #include <usGetModuleContext.h>
30 #include <usModule.h>
31 #include <usServiceProperties.h>
32 #include <usModuleContext.h>
33 
34 //ui header
35 #include "ui_QmitkNavigationToolCreationWidget.h"
36 
46 {
47  Q_OBJECT
48 
49 public:
50  static const std::string VIEW_ID;
51 
56  void Initialize(mitk::DataStorage* dataStorage, const std::string &supposedIdentifier, const std::string &supposedName = "NewTool");
57 
60  void ShowToolPreview(std::string _name);
61 
63  void SetTrackingDeviceType(mitk::TrackingDeviceType type, bool changeable = true);
64 
65  QmitkNavigationToolCreationWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
68  void SetDefaultData(mitk::NavigationTool::Pointer DefaultTool);
69 
71  mitk::NavigationTool::Pointer GetCreatedTool();
72 
73 
74 signals:
75 
77  void NavigationToolFinished();
78 
80  void Canceled();
81 
82  protected slots:
83 
84 
85  void OnLoadCalibrationFile();
86  void OnSurfaceUseToggled();
87  void OnLoadSurface();
88  void OnEditToolTip();
89  void OnEditToolTipFinished(mitk::AffineTransform3D::Pointer toolTip);
90 
91  void OnCancel();
92  void OnFinished();
93 
94  void GetValuesFromGuiElements();
95 
96 private:
97 
98  //############## private help methods #######################
100  void MessageBox(std::string s);
101 
103  void FillUIToolLandmarkLists(mitk::PointSet::Pointer calLandmarks, mitk::PointSet::Pointer regLandmarks);
104 
109  void GetUIToolLandmarksLists(mitk::PointSet::Pointer& calLandmarks, mitk::PointSet::Pointer& regLandmarks);
110 
112  void InitializeUIToolLandmarkLists();
113  void RefreshTrackingDeviceCollection();
114 
115  void SetGuiElements();
116 
117 protected:
119  virtual void CreateConnections();
120 
121  virtual void CreateQtPartControl(QWidget *parent);
122 
123  Ui::QmitkNavigationToolCreationWidgetControls* m_Controls;
124 
127  mitk::NavigationTool::Pointer m_ToolToBeEdited;
128 
130  mitk::NavigationTool::Pointer m_FinalTool;
131 
133 
136 
137 
140 };
141 #endif
Data management class that handles &#39;was created by&#39; relations.
mitk::NavigationTool::Pointer m_ToolToBeEdited
this pointer holds the tool which is edited. If finished is clicked, it will be copied to the final t...
mitk::NavigationTool::Pointer m_FinalTool
this pointer holds the tool which is created and returned
mitk::DataStorage * m_DataStorage
holds the DataStorage
An object of this class offers an UI to create a widget to access the advanced tool creation options...
std::string TrackingDeviceType
QmitkInteractiveTransformationWidget * m_ToolTransformationWidget
Ui::QmitkNavigationToolCreationWidgetControls * m_Controls
#define MITKIGTUI_EXPORT
An object of this class offers an UI to create or modify NavigationTools.