MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkNavigationToolCreationWidget.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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>
23#include <mitkNodePredicateDataType.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
45class MITKIGTUI_EXPORT QmitkNavigationToolCreationWidget : public QWidget
46{
47 Q_OBJECT
48
49public:
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 = {});
69 void SetDefaultData(mitk::NavigationTool::Pointer DefaultTool);
70
72 mitk::NavigationTool::Pointer GetCreatedTool();
73
74
75signals:
76
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
97private:
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
118protected:
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
136 mitk::DataStorage* m_DataStorage;
137
138
140 mitk::DataNode::Pointer m_calLandmarkNode, m_regLandmarkNode;
141};
142#endif
An object of this class offers an UI to create a widget to access the advanced tool creation options.
An object of this class offers an UI to create or modify NavigationTools.
Ui::QmitkNavigationToolCreationWidgetControls * m_Controls
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
void NavigationToolFinished()
This signal is emitted if the user finished the creation of the tool.
void Canceled()
This signal is emitted if the user canceled the creation of the tool.
mitk::DataStorage * m_DataStorage
holds the DataStorage
QmitkInteractiveTransformationWidget * m_ToolTransformationWidget
std::string TrackingDeviceType