CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxRecordTrackingWidget.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 #ifndef CXRECORDTRACKINGWIDGET_H
12 #define CXRECORDTRACKINGWIDGET_H
13 
14 #include <QPushButton>
15 #include <QDomElement>
16 #include "cxForwardDeclarations.h"
17 #include "cxXmlOptionItem.h"
18 #include "cxTool.h"
19 #include "cxVisServices.h"
20 #include "org_custusx_acquisition_Export.h"
21 
22 namespace cx
23 {
24 class WidgetObscuredListener;
25 typedef boost::shared_ptr<class Acquisition> AcquisitionPtr;
26 typedef boost::shared_ptr<class StringPropertySelectMesh> StringPropertySelectMeshPtr;
27 typedef boost::shared_ptr<class ToolRep3D> ToolRep3DPtr;
28 class RecordSessionWidget;
29 typedef boost::shared_ptr<class AcquisitionData> AcquisitionDataPtr;
30 //typedef boost::shared_ptr<class BronchoscopyRegistration> BronchoscopyRegistrationPtr;
31 typedef std::map<QString, ToolPtr> ToolMap;
32 typedef boost::shared_ptr<class StringPropertySelectTool> StringPropertySelectToolPtr;
33 typedef boost::shared_ptr<class SelectRecordSession> SelectRecordSessionPtr;
34 
42 class org_custusx_acquisition_EXPORT RecordTrackingWidget: public QWidget
43 {
44  Q_OBJECT
45 
46 public:
48  AcquisitionServicePtr acquisitionService,
49  VisServicesPtr services,
50  QString category,
51  QWidget *parent);
52  virtual ~RecordTrackingWidget() {}
53 
54  ToolPtr getSuitableRecordingTool();
55  void useBaseToolIfAvailable(bool useBaseTool);
56  TimedTransformMap getRecordedTrackerData_prMt();
57  TimedTransformMap getRecordedTrackerData_prMs();
58  StringPropertyPtr getSessionSelector();
59  SelectRecordSessionPtr getSelectRecordSession() { return mSelectRecordSession; }
60  void displayToolSelector(bool on);
61  void hideMergeWithExistingSession();
62  void drawAcquisitionIn3D(bool draw);
63 
64 signals:
65  void acquisitionCompleted();
66 
67 private slots:
68  void acquisitionStarted();
69  void acquisitionStopped();
70  void acquisitionCancelled();
71  void obscuredSlot(bool obscured);
72 
73 private:
74  VisServicesPtr mServices;
75  AcquisitionServicePtr mAcquisitionService;
76  XmlOptionFile mOptions;
77 
78  RecordSessionWidget* mRecordSessionWidget;
79  QWidget* mToolSelectorWidget;
80  QWidget* mMergeWithExistingSessionWidget;
81  ToolPtr mRecordingTool;
82  SelectRecordSessionPtr mSelectRecordSession;
83  StringPropertySelectToolPtr mToolSelector;
84  BoolPropertyPtr mMergeWithExistingSession;
85  bool mDrawAqquisitionIn3D;
86 
87  boost::shared_ptr<WidgetObscuredListener> mObscuredListener;
88 
89  ToolRep3DPtr getToolRepIn3DView();
90  void onToolChanged();
91  void onMergeChanged();
92 };
93 
94 } //namespace cx
95 
96 #endif // CXRECORDTRACKINGWIDGET_H
boost::shared_ptr< class AcquisitionService > AcquisitionServicePtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class StringPropertySelectTool > StringPropertySelectToolPtr
boost::shared_ptr< class Acquisition > AcquisitionPtr
boost::shared_ptr< class AcquisitionData > AcquisitionDataPtr
boost::shared_ptr< class StringProperty > StringPropertyPtr
SelectRecordSessionPtr getSelectRecordSession()
std::map< QString, ToolPtr > ToolMap
boost::shared_ptr< class SelectRecordSession > SelectRecordSessionPtr
boost::shared_ptr< class ToolRep3D > ToolRep3DPtr
boost::shared_ptr< class BoolProperty > BoolPropertyPtr
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
Helper class for xml files used to store ssc/cx data.
std::map< double, Transform3D > TimedTransformMap
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr