NorMIT-nav  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 
74 
75  void enableControls(bool enable);
76  QFileInfo startRecordFullscreen();
77  void stopRecordFullscreen();
78 
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_ */
cx::CXVBcameraPath
Definition: cxVBcameraPath.h:39
cx::VBWidget::mRouteToTarget
StringPropertySelectMeshPtr mRouteToTarget
Definition: cxVBWidget.h:69
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::VBWidget::mTimer
QTimer * mTimer
Definition: cxVBWidget.h:62
cx::PatientStoragePtr
boost::shared_ptr< class PatientStorage > PatientStoragePtr
Definition: cxVBWidget.h:34
cx::VBWidget::mServices
VisServicesPtr mServices
Definition: cxVBWidget.h:58
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
cx::VBWidget::mAutomaticRotationButtonBackgroundColor
QPalette mAutomaticRotationButtonBackgroundColor
Definition: cxVBWidget.h:67
cx::StringPropertySelectMeshPtr
boost::shared_ptr< class StringPropertySelectMesh > StringPropertySelectMeshPtr
Definition: cxRecordSessionSelector.h:26
cxVBcameraPath.h
cx::MeshPtr
boost::shared_ptr< class Mesh > MeshPtr
Definition: cxForwardDeclarations.h:48
cx::VBWidget::mResetEndoscopeButton
QPushButton * mResetEndoscopeButton
Definition: cxVBWidget.h:65
cx::VBWidget::mControlsEnabled
bool mControlsEnabled
Definition: cxVBWidget.h:71
cx::VBWidget::mPlayButton
QPushButton * mPlayButton
Definition: cxVBWidget.h:61
cx::VBWidget::mViewDial
QDial * mViewDial
Definition: cxVBWidget.h:64
cx::VBWidget::mRotateDial
QDial * mRotateDial
Definition: cxVBWidget.h:63
cx::VBWidget::mRecordVideo
bool mRecordVideo
Definition: cxVBWidget.h:73
cx::VBWidget
Definition: cxVBWidget.h:44
cx::VBWidget::mPlaybackSlider
QSlider * mPlaybackSlider
Definition: cxVBWidget.h:60
cx::VBWidget::mStorage
PatientStoragePtr mStorage
Definition: cxVBWidget.h:79
cxSelectDataStringProperty.h
cxMesh.h
cx::VBWidget::mUseAutomaticRotationButton
QPushButton * mUseAutomaticRotationButton
Definition: cxVBWidget.h:66
cx::VBWidget::mVerticalLayout
QVBoxLayout * mVerticalLayout
Definition: cxVBWidget.h:59
cx::VBWidget::mAutomaticRotation
bool mAutomaticRotation
Definition: cxVBWidget.h:72
cx::VBWidget::mCameraPath
CXVBcameraPath * mCameraPath
Definition: cxVBWidget.h:70