Medical Imaging Interaction Toolkit  2023.04.00
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 
45 class MITKIGTUI_EXPORT QmitkNavigationToolCreationWidget : public QWidget
46 {
47  Q_OBJECT
48 
49 public:
50  static const std::string VIEW_ID;
51 
57  void Initialize(mitk::DataStorage* dataStorage, const std::string &supposedIdentifier, const std::string &supposedName = "NewTool");
58 
61  void ShowToolPreview(std::string _name);
62 
64  void SetTrackingDeviceType(mitk::TrackingDeviceType type, bool changeable = true);
65 
66  QmitkNavigationToolCreationWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
69  void SetDefaultData(mitk::NavigationTool::Pointer DefaultTool);
70 
72  mitk::NavigationTool::Pointer GetCreatedTool();
73 
74 
75 signals:
76 
78  void NavigationToolFinished();
79 
81  void Canceled();
82 
83  protected slots:
84 
85 
86  void OnLoadCalibrationFile();
87  void OnSurfaceUseToggled();
88  void OnLoadSurface();
89  void OnEditToolTip();
90  void OnEditToolTipFinished(mitk::AffineTransform3D::Pointer toolTip);
91 
92  void OnCancel();
93  void OnFinished();
94 
95  void GetValuesFromGuiElements();
96 
97 private:
98 
99  //############## private help methods #######################
101  void MessageBox(std::string s);
102 
104  void FillUIToolLandmarkLists(mitk::PointSet::Pointer calLandmarks, mitk::PointSet::Pointer regLandmarks);
105 
110  void GetUIToolLandmarksLists(mitk::PointSet::Pointer& calLandmarks, mitk::PointSet::Pointer& regLandmarks);
111 
113  void InitializeUIToolLandmarkLists();
114  void RefreshTrackingDeviceCollection();
115 
116  void SetGuiElements();
117 
118 protected:
120  virtual void CreateConnections();
121 
122  virtual void CreateQtPartControl(QWidget *parent);
123 
124  Ui::QmitkNavigationToolCreationWidgetControls* m_Controls;
125 
128  mitk::NavigationTool::Pointer m_ToolToBeEdited;
129 
131  mitk::NavigationTool::Pointer m_FinalTool;
132 
134 
137 
138 
141 };
142 #endif
usModule.h
QmitkNavigationToolCreationWidget::m_ToolTransformationWidget
QmitkInteractiveTransformationWidget * m_ToolTransformationWidget
Definition: QmitkNavigationToolCreationWidget.h:133
usServiceProperties.h
mitkNodePredicateDataType.h
QmitkNavigationToolCreationWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkNavigationToolCreationWidget.h:50
itk::SmartPointer< Self >
QmitkNavigationToolCreationWidget::m_FinalTool
mitk::NavigationTool::Pointer m_FinalTool
this pointer holds the tool which is created and returned
Definition: QmitkNavigationToolCreationWidget.h:131
QmitkInteractiveTransformationWidget.h
QmitkInteractiveTransformationWidget
An object of this class offers an UI to create a widget to access the advanced tool creation options.
Definition: QmitkInteractiveTransformationWidget.h:33
QmitkNavigationToolCreationWidget::m_Controls
Ui::QmitkNavigationToolCreationWidgetControls * m_Controls
Definition: QmitkNavigationToolCreationWidget.h:124
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
QmitkNavigationToolCreationWidget::m_DataStorage
mitk::DataStorage * m_DataStorage
holds the DataStorage
Definition: QmitkNavigationToolCreationWidget.h:136
usModuleContext.h
QmitkNavigationToolCreationWidget::m_regLandmarkNode
mitk::DataNode::Pointer m_regLandmarkNode
Definition: QmitkNavigationToolCreationWidget.h:140
mitkNavigationToolStorage.h
usGetModuleContext.h
QmitkNavigationToolCreationWidget::m_ToolToBeEdited
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...
Definition: QmitkNavigationToolCreationWidget.h:128
QmitkNavigationToolCreationWidget
An object of this class offers an UI to create or modify NavigationTools.
Definition: QmitkNavigationToolCreationWidget.h:45
mitk::TrackingDeviceType
std::string TrackingDeviceType
Definition: mitkTrackingTypes.h:22
mitkNavigationTool.h