NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkSingleViewerControls.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 niftkSingleViewerControls_h
16 #define niftkSingleViewerControls_h
17 
18 #include <QWidget>
19 
20 #include <niftkDnDDisplayExports.h>
21 
22 #include "niftkDnDDisplayEnums.h"
23 
24 
25 namespace Ui
26 {
27 class niftkSingleViewerControls;
28 }
29 
30 
31 namespace niftk
32 {
33 
38 class NIFTKDNDDISPLAY_EXPORT SingleViewerControls : public QWidget
39 {
40  Q_OBJECT
41 
42 public:
43 
45  explicit SingleViewerControls(QWidget *parent = 0);
46 
48  virtual ~SingleViewerControls();
49 
51  bool AreMagnificationControlsVisible() const;
52 
54  void SetMagnificationControlsVisible(bool visible);
55 
57  bool AreMagnificationControlsEnabled() const;
58 
60  void SetMagnificationControlsEnabled(bool enabled);
61 
63  bool AreShowOptionsVisible() const;
64 
66  void SetShowOptionsVisible(bool visible);
67 
69  bool AreWindowLayoutControlsVisible() const;
70 
72  void SetWindowLayoutControlsVisible(bool visible);
73 
75  int GetMaxSlice() const;
76 
78  void SetMaxSlice(int maxSliceIndex);
79 
81  int GetSelectedSlice() const;
82 
84  void SetSelectedSlice(int sliceIndex);
85 
87  int GetMaxTimeStep() const;
88 
90  void SetMaxTimeStep(int maxTimeStep);
91 
93  int GetTimeStep() const;
94 
96  void SetTimeStep(int timeStep);
97 
99  double GetMinMagnification() const;
100 
102  void SetMinMagnification(double minMagnification);
103 
105  double GetMaxMagnification() const;
106 
108  void SetMaxMagnification(double maxMagnification);
109 
111  double GetMagnification() const;
112 
114  void SetMagnification(double magnification);
115 
117  void SetSliceTracking(bool tracking);
118 
120  void SetTimeStepTracking(bool tracking);
121 
123  void SetMagnificationTracking(bool tracking);
124 
126  bool IsCursorVisible() const;
127 
129  void SetCursorVisible(bool visible);
130 
132  bool AreDirectionAnnotationsVisible() const;
133 
135  void SetDirectionAnnotationsVisible(bool visible);
136 
138  bool IsIntensityAnnotationVisible() const;
139 
141  void SetIntensityAnnotationVisible(bool visible);
142 
144  bool Is3DWindowVisible() const;
145 
147  void Set3DWindowVisible(bool visible);
148 
151 
153  void SetWindowLayout(WindowLayout windowlayout);
154 
156  bool AreWindowCursorsBound() const;
157 
159  void SetWindowCursorsBound(bool bound);
160 
162  bool AreWindowMagnificationsBound() const;
163 
165  void SetWindowMagnificationsBound(bool bound);
166 
167 signals:
168 
170  void SelectedSliceChanged(int selectedSlice);
171 
173  void TimeStepChanged(int timeStep);
174 
176  void MagnificationChanged(double magnification);
177 
179  void ShowCursorChanged(bool visible);
180 
182  void ShowDirectionAnnotationsChanged(bool visible);
183 
185  void ShowIntensityAnnotationChanged(bool visible);
186 
188  void Show3DWindowChanged(bool visible);
189 
191  void WindowLayoutChanged(WindowLayout windowLayout);
192 
194  void WindowCursorBindingChanged(bool bound);
195 
197  void WindowMagnificationBindingChanged(bool bound);
198 
199 protected slots:
200 
201  void OnSelectedSliceChanged(double selectedSlice);
202  void OnTimeStepChanged(double timeStep);
203 
205  void OnAxialWindowRadioButtonToggled(bool checked);
206 
208  void OnSagittalWindowRadioButtonToggled(bool checked);
209 
211  void OnCoronalWindowRadioButtonToggled(bool checked);
212 
214  void On3DWindowRadioButtonToggled(bool checked);
215 
217  void OnMultiWindowRadioButtonToggled(bool checked);
218 
220  void OnMultiWindowComboBoxIndexChanged(int index);
221 
222 private:
223 
224  Ui::niftkSingleViewerControls* ui;
225 
226  bool m_ShowShowOptions;
227  bool m_ShowWindowLayoutControls;
228 
230  WindowLayout m_WindowLayout;
231 
233  static WindowLayout s_MultiWindowLayouts[];
234  static int const s_MultiWindowLayoutNumber;
235 };
236 
237 }
238 
239 #endif
GLenum GLsizei const GLuint GLboolean enabled
Definition: glew.h:2537
Definition: niftkSingleViewerControls.h:25
Control panel for the DnD display.
Definition: niftkSingleViewerControls.h:38
WindowLayout
Describes the different render window layouts. So one WindowLayout could have multiple windows of dif...
Definition: niftkDnDDisplayEnums.h:49
GLuint index
Definition: glew.h:1798
WindowLayout GetWindowLayout(const std::string &windowLayoutName)
Definition: niftkDnDDisplayEnums.h:94
Definition: niftkExceptionObject.h:21