NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkSingleViewerWidgetState.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 niftkSingleViewerWidgetState_h
16 #define niftkSingleViewerWidgetState_h
17 
19 
20 #include <QTest>
21 
22 #include <mitkGlobalInteraction.h>
23 
24 
25 namespace niftk
26 {
27 
28 static bool EqualsWithTolerance1(const mitk::Point3D& worldPosition1, const mitk::Point3D& worldPosition2, double tolerance = 0.001)
29 {
30  return std::abs(worldPosition1[0] - worldPosition2[0]) < tolerance
31  && std::abs(worldPosition1[1] - worldPosition2[1]) < tolerance
32  && std::abs(worldPosition1[2] - worldPosition2[2]) < tolerance;
33 }
34 
35 static bool EqualsWithTolerance(const mitk::Vector2D& cursorPosition1, const mitk::Vector2D& cursorPosition2, double tolerance = 0.01)
36 {
37  return std::abs(cursorPosition1[0] - cursorPosition2[0]) < tolerance
38  && std::abs(cursorPosition1[1] - cursorPosition2[1]) < tolerance;
39 }
40 
41 class SingleViewerWidgetState : public itk::Object
42 {
43 public:
44 
48 
50  itkGetConstMacro(TimeGeometry, const mitk::TimeGeometry*);
51 
53  itkSetObjectMacro(TimeGeometry, mitk::TimeGeometry);
54 
56  itkGetConstMacro(Orientation, WindowOrientation);
57 
59  itkSetMacro(Orientation, WindowOrientation);
60 
62  itkGetConstMacro(WindowLayout, WindowLayout);
63 
65  itkSetMacro(WindowLayout, WindowLayout);
66 
68  itkGetConstMacro(SelectedRenderWindow, QmitkRenderWindow*);
69 
71  itkSetObjectMacro(SelectedRenderWindow, QmitkRenderWindow);
72 
74  itkGetConstMacro(TimeStep, unsigned);
75 
77  itkSetMacro(TimeStep, unsigned);
78 
80  itkGetConstMacro(SelectedPosition, mitk::Point3D);
81 
83  itkSetMacro(SelectedPosition, mitk::Point3D);
84 
86  itkGetConstMacro(CursorPositions, std::vector<mitk::Vector2D>);
87 
89  void SetCursorPositions(const std::vector<mitk::Vector2D>& cursorPositions)
90  {
91  this->m_CursorPositions = cursorPositions;
92  }
93 
95  itkGetConstMacro(ScaleFactors, std::vector<double>);
96 
98  void SetScaleFactors(const std::vector<double>& scaleFactors)
99  {
100  m_ScaleFactors = scaleFactors;
101  }
102 
104  itkGetConstMacro(CursorPositionBinding, bool);
105 
107  itkSetMacro(CursorPositionBinding, bool);
108 
110  itkGetConstMacro(ScaleFactorBinding, bool);
111 
113  itkSetMacro(ScaleFactorBinding, bool);
114 
117  bool EqualsWithTolerance(const std::vector<mitk::Vector2D>& cursorPositions1, const std::vector<mitk::Vector2D>& cursorPositions2, double tolerance = 0.001) const
118  {
119  std::vector<QmitkRenderWindow*> renderWindows = m_Viewer->GetRenderWindows();
120  for (int i = 0; i < 3; ++i)
121  {
122  if (renderWindows[i]->isVisible() && !niftk::EqualsWithTolerance(cursorPositions1[i], cursorPositions2[i], tolerance))
123  {
124  return false;
125  }
126  }
127  return true;
128  }
129 
132  bool EqualsWithTolerance(const std::vector<double>& scaleFactors1, const std::vector<double>& scaleFactors2, double tolerance = 0.001) const
133  {
134  std::vector<QmitkRenderWindow*> renderWindows = m_Viewer->GetRenderWindows();
135  for (int i = 0; i < 3; ++i)
136  {
137  if (renderWindows[i]->isVisible() && !niftk::EqualsWithTolerance(scaleFactors1[i], scaleFactors2[i], tolerance))
138  {
139  return false;
140  }
141  }
142  return true;
143  }
144 
145  bool operator==(const SingleViewerWidgetState& otherState) const
146  {
147  return
148  this->GetTimeGeometry() == otherState.GetTimeGeometry()
149  && this->GetOrientation() == otherState.GetOrientation()
150  && this->GetWindowLayout() == otherState.GetWindowLayout()
151  && this->GetSelectedRenderWindow() == otherState.GetSelectedRenderWindow()
152  && this->GetTimeStep() == otherState.GetTimeStep()
154  && this->EqualsWithTolerance(this->GetCursorPositions(), otherState.GetCursorPositions(), 0.01)
155  && this->EqualsWithTolerance(this->GetScaleFactors(), otherState.GetScaleFactors(), 0.01)
156  && this->GetCursorPositionBinding() == otherState.GetCursorPositionBinding()
157  && this->GetScaleFactorBinding() == otherState.GetScaleFactorBinding();
158  }
159 
160  inline bool operator!=(const SingleViewerWidgetState& otherState) const
161  {
162  return !(*this == otherState);
163  }
164 
165  void PrintDifference(SingleViewerWidgetState::Pointer otherState, std::ostream & os = std::cout, itk::Indent indent = 0) const
166  {
167  if (this->GetTimeGeometry() != otherState->GetTimeGeometry())
168  {
169  os << indent << "Time geometry: " << this->GetTimeGeometry() << " ; " << otherState->GetTimeGeometry() << std::endl;
170  }
171  if (this->GetOrientation() != otherState->GetOrientation())
172  {
173  os << indent << "Orientation: " << this->GetOrientation() << " ; " << otherState->GetOrientation() << std::endl;
174  }
175  if (this->GetWindowLayout() != otherState->GetWindowLayout())
176  {
177  os << indent << "Window layout: " << this->GetWindowLayout() << " ; " << otherState->GetWindowLayout() << std::endl;
178  }
179  if (this->GetSelectedRenderWindow() != otherState->GetSelectedRenderWindow())
180  {
181  os << indent << "Selected render window: " << this->GetSelectedRenderWindow() << " ; " << otherState->GetOrientation() << std::endl;
182  }
183  if (this->GetTimeStep() != otherState->GetTimeStep())
184  {
185  os << indent << "Time step: " << this->GetTimeStep() << " ; " << otherState->GetTimeStep() << std::endl;
186  }
187  if (!niftk::EqualsWithTolerance1(this->GetSelectedPosition(), otherState->GetSelectedPosition(), 0.001))
188  {
189  os << indent << "Selected position: " << this->GetSelectedPosition() << ", " << otherState->GetSelectedPosition() << std::endl;
190  }
191  if (!this->EqualsWithTolerance(this->GetCursorPositions(), otherState->GetCursorPositions(), 0.01))
192  {
193  std::vector<mitk::Vector2D> otherStateCursorPositions = otherState->GetCursorPositions();
194  os << indent << "Cursor positions:" << std::endl;
195  os << indent << " " << m_CursorPositions[0] << ", " << otherStateCursorPositions[0] << std::endl;
196  os << indent << " " << m_CursorPositions[1] << ", " << otherStateCursorPositions[1] << std::endl;
197  os << indent << " " << m_CursorPositions[2] << ", " << otherStateCursorPositions[2] << std::endl;
198  }
199  if (!this->EqualsWithTolerance(this->GetScaleFactors(), otherState->GetScaleFactors(), 0.01))
200  {
201  std::vector<double> otherStateScaleFactors = otherState->GetScaleFactors();
202  os << indent << "Scale factors:" << std::endl;
203  os << indent << " " << m_ScaleFactors[0] << ", " << otherStateScaleFactors[0] << std::endl;
204  os << indent << " " << m_ScaleFactors[1] << ", " << otherStateScaleFactors[1] << std::endl;
205  os << indent << " " << m_ScaleFactors[2] << ", " << otherStateScaleFactors[2] << std::endl;
206  }
207  if (this->GetCursorPositionBinding() != otherState->GetCursorPositionBinding())
208  {
209  os << indent << "Cursor position binding: " << this->GetCursorPositionBinding() << " ; " << otherState->GetCursorPositionBinding() << std::endl;
210  }
211  if (this->GetScaleFactorBinding() != otherState->GetScaleFactorBinding())
212  {
213  os << indent << "Scale factor binding: " << this->GetScaleFactorBinding() << " ; " << otherState->GetScaleFactorBinding() << std::endl;
214  }
215  }
216 
217  void Check() const
218  {
219  if (m_Viewer->IsFocused())
220  {
221  QmitkRenderWindow* selectedRenderWindow = m_Viewer->GetSelectedRenderWindow();
222  if (!selectedRenderWindow)
223  {
224  MITK_INFO << "ERROR: Invalid state. The viewer is selected but there is no selected render window.";
225  MITK_INFO << Self::ConstPointer(this);
226  QFAIL("Invalid state. The viewer is selected but there is no selected render window.");
227  }
232  if (qApp->focusWidget() && !selectedRenderWindow->hasFocus())
233  {
234  MITK_INFO << "ERROR: Invalid state. The viewer is selected but the selected render window has not got the Qt key focus.";
235  MITK_INFO << Self::ConstPointer(this);
236  QFAIL("Invalid state. The viewer is selected but the selected render window has not got the Qt key focus.");
237  }
238  if (mitk::GlobalInteraction::GetInstance()->GetFocus() != selectedRenderWindow->GetRenderer())
239  {
240  MITK_INFO << "ERROR: Invalid state. The viewer is selected but the selected render window has not got the MITK interaction focus.";
241  MITK_INFO << Self::ConstPointer(this);
242  QFAIL("Invalid state. The viewer is selected but the selected render window has not got the MITK interaction focus.");
243  }
244  }
245  else
246  {
247  QmitkRenderWindow* selectedRenderWindow = m_Viewer->GetSelectedRenderWindow();
248  if (!selectedRenderWindow)
249  {
250  MITK_INFO << "ERROR: Invalid state. The viewer is selected but there is no selected render window.";
251  MITK_INFO << Self::ConstPointer(this);
252  QFAIL("Invalid state. The viewer is selected but there is no selected render window.");
253  }
254  if (m_Viewer->GetAxialWindow()->hasFocus()
255  || m_Viewer->GetSagittalWindow()->hasFocus()
256  || m_Viewer->GetCoronalWindow()->hasFocus()
257  || m_Viewer->Get3DWindow()->hasFocus()
258  || m_Viewer->hasFocus())
259  {
260  MITK_INFO << "ERROR: Invalid state. The viewer has the Qt focus, although it is not selected.";
261  MITK_INFO << Self::ConstPointer(this);
262  QFAIL("Invalid state. The viewer has the Qt focus, although it is not selected.");
263  }
264  mitk::BaseRenderer* focusedRenderer = mitk::GlobalInteraction::GetInstance()->GetFocus();
265  if (focusedRenderer == m_Viewer->GetAxialWindow()->GetRenderer()
266  || focusedRenderer == m_Viewer->GetSagittalWindow()->GetRenderer()
267  || focusedRenderer == m_Viewer->GetCoronalWindow()->GetRenderer()
268  || focusedRenderer == m_Viewer->Get3DWindow()->GetRenderer())
269  {
270  MITK_INFO << "ERROR: Invalid state. The viewer has the MITK interaction focus, although it is not selected.";
271  MITK_INFO << Self::ConstPointer(this);
272  QFAIL("Invalid state. The viewer has the MITK interaction focus, although it is not selected.");
273  }
274  }
275 
283 
284  int axialSliceIndex = m_Viewer->GetSelectedSlice(WINDOW_ORIENTATION_AXIAL);
285  int sagittalSliceIndex = m_Viewer->GetSelectedSlice(WINDOW_ORIENTATION_SAGITTAL);
286  int coronalSliceIndex = m_Viewer->GetSelectedSlice(WINDOW_ORIENTATION_CORONAL);
287 
288  int axialMaxSliceIndex = m_Viewer->GetMaxSlice(WINDOW_ORIENTATION_AXIAL);
289  int sagittalMaxSliceIndex = m_Viewer->GetMaxSlice(WINDOW_ORIENTATION_SAGITTAL);
290  int coronalMaxSliceIndex = m_Viewer->GetMaxSlice(WINDOW_ORIENTATION_CORONAL);
291 
292  mitk::SliceNavigationController* axialSnc = m_Viewer->GetAxialWindow()->GetSliceNavigationController();
293  mitk::SliceNavigationController* sagittalSnc = m_Viewer->GetSagittalWindow()->GetSliceNavigationController();
294  mitk::SliceNavigationController* coronalSnc = m_Viewer->GetCoronalWindow()->GetSliceNavigationController();
295 
296  QVERIFY(axialMaxSliceIndex == axialSnc->GetSlice()->GetSteps() - 1);
297  QVERIFY(sagittalMaxSliceIndex == sagittalSnc->GetSlice()->GetSteps() - 1);
298  QVERIFY(coronalMaxSliceIndex == coronalSnc->GetSlice()->GetSteps() - 1);
299 
300  int axialSncPos = axialSnc->GetSlice()->GetPos();
301  int sagittalSncPos = sagittalSnc->GetSlice()->GetPos();
302  int coronalSncPos = coronalSnc->GetSlice()->GetPos();
303 
304  int expectedAxialSliceIndex = m_UpDirections[2] > 0 ? axialSncPos : axialMaxSliceIndex - axialSncPos;
305  int expectedSagittalSliceIndex = m_UpDirections[0] > 0 ? sagittalSncPos : sagittalMaxSliceIndex - sagittalSncPos;
306  int expectedCoronalSliceIndex = m_UpDirections[1] > 0 ? coronalSncPos : coronalMaxSliceIndex - coronalSncPos;
307 
308  if (axialSliceIndex != expectedAxialSliceIndex
309  || sagittalSliceIndex != expectedSagittalSliceIndex
310  || coronalSliceIndex != expectedCoronalSliceIndex)
311  {
312 // MITK_INFO << "ERROR: Invalid state. The selected slice indices do not match in the viewer and in the SNCs.";
313 // MITK_INFO << "Axial slice index: " << axialSliceIndex << " ; SNC position: " << axialSncPos
314 // << " ; max index: " << axialMaxSliceIndex << " ; flipped: " << m_UpDirections[2];
315 // MITK_INFO << "Sagittal slice index: " << sagittalSliceIndex << " ; SNC position: " << sagittalSncPos
316 // << " ; max index: " << sagittalMaxSliceIndex << " ; flipped: " << m_UpDirections[0];
317 // MITK_INFO << "Coronal slice index: " << coronalSliceIndex << " ; SNC position: " << coronalSncPos
318 // << " ; max index: " << coronalMaxSliceIndex << " ; flipped: " << m_UpDirections[1];
319 // MITK_INFO << Self::ConstPointer(this);
320 // QFAIL("Invalid state. The selected slice indices do not match in the viewer and in the SNCs.");
321  }
322  }
323 
324 protected:
325 
328  : itk::Object()
329  , m_Viewer(viewer)
330  , m_TimeGeometry(viewer->GetTimeGeometry())
331  , m_Orientation(viewer->GetOrientation())
332  , m_WindowLayout(viewer->GetWindowLayout())
333  , m_SelectedRenderWindow(viewer->GetSelectedRenderWindow())
334  , m_TimeStep(viewer->GetTimeStep())
335  , m_SelectedPosition(viewer->GetSelectedPosition())
336  , m_CursorPositions(viewer->GetCursorPositions())
337  , m_ScaleFactors(viewer->GetScaleFactors())
338  , m_CursorPositionBinding(viewer->GetCursorPositionBinding())
339  , m_ScaleFactorBinding(viewer->GetScaleFactorBinding())
340  {
341  m_UpDirections[0] = m_Viewer->GetSliceUpDirection(WINDOW_ORIENTATION_SAGITTAL);
342  m_UpDirections[1] = m_Viewer->GetSliceUpDirection(WINDOW_ORIENTATION_CORONAL);
343  m_UpDirections[2] = m_Viewer->GetSliceUpDirection(WINDOW_ORIENTATION_AXIAL);
344  }
345 
347  SingleViewerWidgetState(Self::Pointer otherState)
348  : itk::Object()
349  , m_Viewer(otherState->m_Viewer)
350  , m_TimeGeometry(otherState->GetTimeGeometry())
351  , m_Orientation(otherState->GetOrientation())
352  , m_WindowLayout(otherState->GetWindowLayout())
353  , m_SelectedRenderWindow(otherState->GetSelectedRenderWindow())
354  , m_TimeStep(otherState->GetTimeStep())
355  , m_SelectedPosition(otherState->GetSelectedPosition())
356  , m_CursorPositions(otherState->GetCursorPositions())
357  , m_ScaleFactors(otherState->GetScaleFactors())
358  , m_CursorPositionBinding(otherState->GetCursorPositionBinding())
359  , m_ScaleFactorBinding(otherState->GetScaleFactorBinding())
360  , m_UpDirections(otherState->m_UpDirections)
361  {
362  }
363 
366  {
367  }
368 
370  virtual void PrintSelf(std::ostream & os, itk::Indent indent) const override
371  {
372 // os << indent << "time geometry: " << m_TimeGeometry << std::endl;
373  os << indent << "orientation: " << m_Orientation << std::endl;
374  os << indent << "window layout: " << m_WindowLayout << std::endl;
375  if (m_SelectedRenderWindow)
376  {
377  os << indent << "selected render window: " << m_SelectedRenderWindow << ", " << m_SelectedRenderWindow->GetRenderer()->GetName() << std::endl;
378  }
379  else
380  {
381  os << indent << "selected render window: none" << std::endl;
382  }
383  os << indent << "time step: " << m_TimeStep << std::endl;
384  os << indent << "selected position: " << m_SelectedPosition << std::endl;
385  os << indent << "cursor positions: " << m_CursorPositions[0] << ", " << m_CursorPositions[1] << ", " << m_CursorPositions[2] << std::endl;
386  os << indent << "scale factors: " << m_ScaleFactors[0] << ", " << m_ScaleFactors[1] << ", " << m_ScaleFactors[2] << std::endl;
387  os << indent << "cursor position binding: " << m_CursorPositionBinding << std::endl;
388  os << indent << "scale factor binding: " << m_ScaleFactorBinding << std::endl;
389  }
390 
391 private:
392 
394  const SingleViewerWidget* m_Viewer;
395 
397  const mitk::TimeGeometry* m_TimeGeometry;
398 
400  WindowOrientation m_Orientation;
401 
403  WindowLayout m_WindowLayout;
404 
406  QmitkRenderWindow* m_SelectedRenderWindow;
407 
409  unsigned m_TimeStep;
410 
412  mitk::Point3D m_SelectedPosition;
413 
415  std::vector<mitk::Vector2D> m_CursorPositions;
416 
418  std::vector<double> m_ScaleFactors;
419 
421  bool m_CursorPositionBinding;
422 
424  bool m_ScaleFactorBinding;
425 
427  mitk::Vector3D m_UpDirections;
428 };
429 
430 }
431 
432 #endif
void SetCursorPositions(const std::vector< mitk::Vector2D > &cursorPositions)
Sets the cursor positions in the render windows of the viewer.
Definition: niftkSingleViewerWidgetState.h:89
const std::vector< QmitkRenderWindow * > & GetRenderWindows() const
Returns the list of all QmitkRenderWindow contained herein.
Definition: niftkSingleViewerWidget.cxx:213
WindowOrientation
Describes the different types of orientation, axial, sagittal, coronal, that can be achieved in the D...
Definition: niftkDnDDisplayEnums.h:29
QmitkRenderWindow * GetAxialWindow() const
Returns the Axial Window.
Definition: niftkSingleViewerWidget.cxx:220
void Check() const
Definition: niftkSingleViewerWidgetState.h:217
SingleViewerWidgetState(const SingleViewerWidget *viewer)
Constructs a SingleViewerWidgetState object that stores the current state of the specified viewer...
Definition: niftkSingleViewerWidgetState.h:327
void SetScaleFactors(const std::vector< double > &scaleFactors)
Sets the scale factors in the render windows of the viewer.
Definition: niftkSingleViewerWidgetState.h:98
mitkClassMacroItkParent(SingleViewerWidgetState, itk::Object) mitkNewMacro1Param(SingleViewerWidgetState
QmitkRenderWindow * Get3DWindow() const
Returns the 3D Window.
Definition: niftkSingleViewerWidget.cxx:241
int GetMaxSlice(WindowOrientation orientation) const
Returns the maximum allowed slice index for a given orientation.
Definition: niftkSingleViewerWidget.cxx:332
Definition: niftkDnDDisplayEnums.h:31
const SingleViewerWidget * mitkNewMacro1Param(SingleViewerWidgetState, Self::Pointer) virtual const mitk
Gets the time geometry of the viewer.
Definition: niftkSingleViewerWidgetState.h:47
QmitkRenderWindow * GetCoronalWindow() const
Returns the Coronal Window.
Definition: niftkSingleViewerWidget.cxx:234
static bool EqualsWithTolerance(const mitk::Vector2D &cursorPosition1, const mitk::Vector2D &cursorPosition2, double tolerance=0.01)
Definition: niftkSingleViewerWidgetState.h:35
int GetSelectedSlice(WindowOrientation orientation) const
Gets the index of the selected slice for a given orientation.
Definition: niftkSingleViewerWidget.cxx:608
Orientation
Definition: itkMIDASHelper.h:35
Definition: niftkMeshSmoother.cxx:19
bool IsFocused() const
Tells if the selected render window has the focus.
Definition: niftkSingleViewerWidget.cxx:178
virtual QmitkRenderWindow * GetSelectedRenderWindow() const
Gets the selected render window of the viewer.
Definition: ReceptorMemberCommandTest.cxx:25
Definition: niftkITKAffineResampleImage.cxx:74
virtual ~SingleViewerWidgetState()
Destructs a SingleViewerWidgetState object.
Definition: niftkSingleViewerWidgetState.h:365
SingleViewerWidgetState(Self::Pointer otherState)
Constructs a SingleViewerWidgetState object as a copy of another state object.
Definition: niftkSingleViewerWidgetState.h:347
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const override
Prints the collected signals to the given stream or to the standard output if no stream is given...
Definition: niftkSingleViewerWidgetState.h:370
virtual std::vector< double > GetScaleFactors() const
Gets the scale factors in the render windows of the viewer.
void PrintDifference(SingleViewerWidgetState::Pointer otherState, std::ostream &os=std::cout, itk::Indent indent=0) const
Definition: niftkSingleViewerWidgetState.h:165
virtual mitk::Point3D GetSelectedPosition() const
Gets the selected position in the viewer.
virtual std::vector< mitk::Vector2D > GetCursorPositions() const
Gets the cursor positions in the render windows of the viewer.
WindowLayout
Describes the different render window layouts. So one WindowLayout could have multiple windows of dif...
Definition: niftkDnDDisplayEnums.h:49
Definition: niftkSingleViewerWidgetState.h:41
A widget to wrap a single MultiWindowWidget, providing methods for switching the render window layout...
Definition: niftkSingleViewerWidget.h:78
bool operator==(const SingleViewerWidgetState &otherState) const
Definition: niftkSingleViewerWidgetState.h:145
int GetSliceUpDirection(WindowOrientation orientation) const
According to the currently set geometry will return +1, or -1 for the direction to increment the slic...
Definition: niftkSingleViewerWidget.cxx:971
Definition: niftkDnDDisplayEnums.h:32
virtual unsigned GetTimeStep() const
Gets the selected time step in the viewer.
bool EqualsWithTolerance(const std::vector< double > &scaleFactors1, const std::vector< double > &scaleFactors2, double tolerance=0.001) const
Compares the scale factors of the visible render windows, permetting the given tolerance. Returns true if the scale factors are equal, otherwise false.
Definition: niftkSingleViewerWidgetState.h:132
static bool EqualsWithTolerance1(const mitk::Point3D &worldPosition1, const mitk::Point3D &worldPosition2, double tolerance=0.001)
Definition: niftkSingleViewerWidgetState.h:28
virtual WindowOrientation GetOrientation() const
Gets the orientation of the viewer.
QmitkRenderWindow * GetSelectedRenderWindow() const
Returns the selected window. If a window has the focus (and it has a coloured border) then it is retu...
Definition: niftkSingleViewerWidget.cxx:192
virtual bool GetScaleFactorBinding() const
Gets the scale factor binding property of the viewer.
virtual bool GetCursorPositionBinding() const
Gets the cursor position binding property of the viewer.
virtual WindowLayout GetWindowLayout() const
Gets the window layout of the viewer.
bool EqualsWithTolerance(const std::vector< mitk::Vector2D > &cursorPositions1, const std::vector< mitk::Vector2D > &cursorPositions2, double tolerance=0.001) const
Compares the cursor positions of the visible render windows, permetting the given tolerance...
Definition: niftkSingleViewerWidgetState.h:117
Definition: niftkExceptionObject.h:21
bool operator!=(const SingleViewerWidgetState &otherState) const
Definition: niftkSingleViewerWidgetState.h:160
QmitkRenderWindow * GetSagittalWindow() const
Returns the Sagittal Window.
Definition: niftkSingleViewerWidget.cxx:227
Definition: niftkDnDDisplayEnums.h:33