NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkVLVideoOverlayWidget.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef niftkVLVideoOverlayWidget_h
16 #define niftkVLVideoOverlayWidget_h
17 
18 // Note:
19 // The None constant is defined by Xlib.h and it is also declared as an enum
20 // in qstyleoption.h. This causes a compile error with gcc. As a workaround,
21 // we undefine the symbol before including the Qt headers. This works only
22 // if cotire is switched off.
23 #ifdef None
24 #undef None
25 #endif
26 
27 #include "ui_niftkVLVideoOverlayWidget.h"
28 #include "niftkVLExports.h"
29 #include <QWidget>
30 #include <mitkDataStorage.h>
31 
32 class OclResourceService;
33 class QHBoxLayout;
34 
35 namespace niftk
36 {
37 
38 class VLWidget;
39 
45 class NIFTKVL_EXPORT VLVideoOverlayWidget : public QWidget, public Ui_VLVideoOverlayWidget
46 {
47 
48  Q_OBJECT
49 
50 public:
51 
52  VLVideoOverlayWidget(QWidget *parent);
53  virtual ~VLVideoOverlayWidget();
54 
55  void SetBackgroundColour(unsigned int aabbggrr);
56  void SetEyeHandFileName(const std::string& fileName);
57  void SetDataStorage(mitk::DataStorage* storage);
58 
59 private slots:
60 
61  void OnLeftOverlayCheckBoxChecked(bool);
62  void OnRightOverlayCheckBoxChecked(bool);
63  void On3DViewerCheckBoxChecked(bool);
64  void OnTrackedViewerCheckBoxChecked(bool);
65  void OnOpacitySliderMoved(int);
66  void OnLeftImageSelected(const mitk::DataNode* node);
67  void OnRightImageSelected(const mitk::DataNode* node);
68  void OnTransformSelected(const mitk::DataNode* node);
69 
70 private:
71 
72  VLVideoOverlayWidget(const VLVideoOverlayWidget&); // Purposefully not implemented.
73  void operator=(const VLVideoOverlayWidget&); // Purposefully not implemented.
74 
78  void DeRegisterDataStorageListeners();
79 
83  void NodeChanged(const mitk::DataNode* node);
84 
85  mitk::DataStorage::Pointer m_DataStorage;
86 
87  QHBoxLayout* m_HorizontalLayout;
88  QWidget* m_OverlayViewers;
89  VLWidget* m_LeftOverlayViewer;
90  VLWidget* m_RightOverlayViewer;
91  VLWidget* m_TrackedViewer;
92  VLWidget* m_3DViewer;
93 };
94 
95 } // end namespace
96 
97 #endif
A QGLWidget containing a niftk::VLSceneView.
Definition: niftkVLWidget.h:48
Contains 4 coordinated VL views for AR purposes (e.g. liver project).
Definition: niftkVLVideoOverlayWidget.h:45
Definition: niftkExceptionObject.h:21
GLsizei const GLcharARB ** string
Definition: glew.h:5194