CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxToolTipCalibrationWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXTOOLTIPCALIBRATIONWIDGET_H_
13 #define CXTOOLTIPCALIBRATIONWIDGET_H_
14 
15 #include "org_custusx_calibration_Export.h"
16 
17 #include "cxTransform3D.h"
18 #include "cxVector3D.h"
19 #include "cxBaseWidget.h"
21 #include "cxForwardDeclarations.h"
22 
23 class QPushButton;
24 class QGroupBox;
25 class QLineEdit;
26 
27 namespace cx
28 {
29 class LabeledComboBoxWidget;
30 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
31 typedef boost::shared_ptr<class StringPropertySelectTool> StringPropertySelectToolPtr;
32 
45 class org_custusx_calibration_EXPORT ToolTipCalibrateWidget : public BaseWidget
46 {
47  Q_OBJECT
48 
49 public:
50  ToolTipCalibrateWidget(VisServicesPtr services, QWidget* parent);
52 
53 private slots:
54  void calibrateSlot();
55  void testCalibrationSlot();
56  void toolSelectedSlot();
57  void onTrackingSystemStateChanged();
58 
59 private:
60  VisServicesPtr mServices;
61  QPushButton* mCalibrateButton;
62  LabeledComboBoxWidget* mCalibrateToolComboBox;
63  QLabel* mReferencePointLabel;
64  QPushButton* mTestButton;
65  QLabel* mCalibrationLabel;
66  QLabel* mDeltaLabel;
67  StringPropertySelectToolPtr mTools;
68 };
69 
70 
74 class org_custusx_calibration_EXPORT ToolTipCalibrationCalculator
75 {
76 public:
79 
80  Vector3D get_delta_ref();
81  Transform3D get_calibration_sMt();
82 
83 private:
84  Vector3D get_sampledPoint_t();
85  Vector3D get_sampledPoint_ref();
86  Vector3D get_referencePoint_ref();
87  Transform3D get_sMt_new();
88 
89  SpaceProviderPtr mSpaces;
90  ToolPtr mTool;
91  ToolPtr mRef;
92  Vector3D mP_t;
93 };
94 
98 }//namespace cx
99 #endif /* CXTOOLTIPCALIBRATIONWIDGET_H_ */
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class StringPropertySelectTool > StringPropertySelectToolPtr
Composite widget for string selection.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
Interface for QWidget which handles widgets uniformly for the system.
Definition: cxBaseWidget.h:88
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr