Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxVBWidget.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 CXVBWIDGET_H_
13 #define CXVBWIDGET_H_
14 
15 #include <QWidget>
16 
17 #include "ctkPluginContext.h"
18 
20 #include "cxMesh.h"
21 #include "cxVBcameraPath.h"
22 #include "org_custusx_virtualbronchoscopy_Export.h"
23 
24 
25 class QVBoxLayout;
26 class QDial;
27 class QSlider;
28 class QPushButton;
29 
30 namespace cx
31 {
32 
33 typedef boost::shared_ptr<class StringPropertySelectMesh> StringPropertySelectMeshPtr;
34 typedef boost::shared_ptr<class PatientStorage> PatientStoragePtr;
35 
44 class org_custusx_virtualbronchoscopy_EXPORT VBWidget : public QWidget
45 {
46  Q_OBJECT
47 public:
48  VBWidget(VisServicesPtr services, QWidget *parent = 0);
49  virtual ~VBWidget();
50  void setRouteToTarget(QString uid);
51  void setRoutePositions(std::vector< Eigen::Vector3d > routePositions);
52  void setCameraRotationAlongRoute(std::vector< double > cameraRotations);
53  void setBranchingIndexAlongRoute(std::vector< int > branchingIndex);
54  void setRecordVideoOption(bool recordVideo);
55 
56 protected:
57  QString defaultWhatsThis() const;
59  QVBoxLayout* mVerticalLayout;
60  QSlider* mPlaybackSlider;
61  QPushButton *mPlayButton;
62  QTimer* mTimer;
63  QDial* mRotateDial;
64  QDial* mViewDial;
65  QPushButton* mResetEndoscopeButton;
68 
69  StringPropertySelectMeshPtr mRouteToTarget;
74 
75  void enableControls(bool enable);
76  QFileInfo startRecordFullscreen();
77  void stopRecordFullscreen();
78 
79  PatientStoragePtr mStorage;
80 
81 signals:
82  void cameraPathChanged(MeshPtr pathMesh);
83  void cameraAtEndPosition();
84 
85 private slots:
86  void inputChangedSlot();
87  void moveCameraSlot();
88  void resetEndoscopeSlot();
89  void automaticRotationSlot();
90  void updateRotationDialSlot(int value);
91 
92 protected slots:
93  virtual void keyPressEvent(QKeyEvent* event);
94  void playButtonClickedSlot();
95 };
96 
97 } /* namespace cx */
98 
99 #endif /* CXVBWIDGET_H_ */
bool mRecordVideo
Definition: cxVBWidget.h:73
VisServicesPtr mServices
Definition: cxVBWidget.h:58
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
QDial * mViewDial
Definition: cxVBWidget.h:64
QPalette mAutomaticRotationButtonBackgroundColor
Definition: cxVBWidget.h:67
PatientStoragePtr mStorage
Definition: cxVBWidget.h:79
StringPropertySelectMeshPtr mRouteToTarget
Definition: cxVBWidget.h:69
QDial * mRotateDial
Definition: cxVBWidget.h:63
bool mControlsEnabled
Definition: cxVBWidget.h:71
QTimer * mTimer
Definition: cxVBWidget.h:62
QSlider * mPlaybackSlider
Definition: cxVBWidget.h:60
QPushButton * mUseAutomaticRotationButton
Definition: cxVBWidget.h:66
QPushButton * mPlayButton
Definition: cxVBWidget.h:61
boost::shared_ptr< class PatientStorage > PatientStoragePtr
Definition: cxVBWidget.h:34
QVBoxLayout * mVerticalLayout
Definition: cxVBWidget.h:59
CXVBcameraPath * mCameraPath
Definition: cxVBWidget.h:70
QPushButton * mResetEndoscopeButton
Definition: cxVBWidget.h:65
boost::shared_ptr< class Mesh > MeshPtr
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
bool mAutomaticRotation
Definition: cxVBWidget.h:72
Namespace for all CustusX production code.