Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkStdMultiWidget.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QMITKSTDMULTIWIDGET_H
14 #define QMITKSTDMULTIWIDGET_H
15 
16 // qt widgets module
17 #include "MitkQtWidgetsExports.h"
19 
25 {
26  Q_OBJECT
27 
28 public:
30  QWidget *parent = nullptr,
31  Qt::WindowFlags f = nullptr,
32  const QString &name = "stdmulti");
33 
34  ~QmitkStdMultiWidget() override;
35 
36  virtual void InitializeMultiWidget() override;
37 
38  virtual QmitkRenderWindow* GetRenderWindow(const QString& widgetName) const override;
39  virtual QmitkRenderWindow* GetRenderWindow(const mitk::BaseRenderer::ViewDirection& viewDirection) const override;
40 
41  virtual void SetSelectedPosition(const mitk::Point3D& newPosition, const QString& widgetName) override;
42  virtual const mitk::Point3D GetSelectedPosition(const QString& widgetName) const override;
43 
44  virtual void SetCrosshairVisibility(bool) override;
45  virtual bool GetCrosshairVisibility() const override;
46 
47  virtual void ResetCrosshair() override;
48 
49  virtual void SetWidgetPlaneMode(int mode) override;
50 
51  mitk::SliceNavigationController* GetTimeNavigationController();
52 
53  void AddPlanesToDataStorage();
54  void RemovePlanesFromDataStorage();
55 
60  void HandleCrosshairPositionEvent();
61 
67  QmitkRenderWindow* GetRenderWindow(unsigned int number) const;
68  QmitkRenderWindow* GetRenderWindow1() const;
69  QmitkRenderWindow* GetRenderWindow2() const;
70  QmitkRenderWindow* GetRenderWindow3() const;
71  QmitkRenderWindow* GetRenderWindow4() const;
72 
78  mitk::DataNode::Pointer GetWidgetPlane(unsigned int number) const;
79  mitk::DataNode::Pointer GetWidgetPlane1() const;
80  mitk::DataNode::Pointer GetWidgetPlane2() const;
81  mitk::DataNode::Pointer GetWidgetPlane3() const;
82 
91  void SetDecorationColor(unsigned int widgetNumber, mitk::Color color);
97  mitk::Color GetDecorationColor(unsigned int widgetNumber);
98 
99 public Q_SLOTS:
100 
101  // mouse events
102  virtual void mousePressEvent(QMouseEvent*) override;
103  virtual void moveEvent(QMoveEvent* e) override;
104  virtual void wheelEvent(QWheelEvent* e) override;
105 
107  void HandleCrosshairPositionEventDelayed();
108 
109  void Fit();
110 
111  void AddDisplayPlaneSubTree();
112 
113  void EnsureDisplayContainsPoint(mitk::BaseRenderer *renderer, const mitk::Point3D &p);
114 
115  void SetWidgetPlaneVisibility(const char *widgetName, bool visible, mitk::BaseRenderer *renderer = nullptr);
116 
117  void SetWidgetPlanesVisibility(bool visible, mitk::BaseRenderer *renderer = nullptr);
118 
119 Q_SIGNALS:
120 
121  void WheelMoved(QWheelEvent *);
122  void Moved();
123 
124 private:
125 
126  virtual void SetLayoutImpl() override;
127  virtual void SetInteractionSchemeImpl() override { }
128 
129  void CreateRenderWindowWidgets();
130 
132 
139 
144  mitk::DataNode::Pointer m_ParentNodeForGeometryPlanes;
145 
152  mitk::Color m_DecorationColorWidget4;
153 
154  bool m_PendingCrosshairPositionEvent;
155 
156 };
157 
158 #endif // QMITKSTDMULTIWIDGET_H
QmitkRenderWindow * GetRenderWindow(int row, int column) const
virtual const mitk::Point3D GetSelectedPosition(const QString &widgetName) const =0
void AddDisplayPlaneSubTree()
mitk::DataNode::Pointer m_PlaneNode3
Organizes the rendering process.
#define MITKQTWIDGETS_EXPORT
virtual void InitializeMultiWidget()=0
Controls the selection of the slice the associated BaseRenderer will display.
mitk::DataNode::Pointer m_PlaneNode1
The 'QmitkStdMultiWidget' is a 'QmitkAbstractMultiWidget' that is used to display multiple render win...
virtual void SetCrosshairVisibility(bool visible)=0
MITK implementation of the QVTKWidget.
mitk::DataNode::Pointer m_PlaneNode2
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
void Fit()
virtual void SetWidgetPlaneMode(int mode)=0
ViewDirection
Possible view directions for render windows.
mitk::SliceNavigationController * m_TimeNavigationController
virtual void ResetCrosshair()=0
The &#39;QmitkAbstractMultiWidget&#39; is a &#39;QWidget&#39; that can be subclassed to display multiple render windo...
virtual bool GetCrosshairVisibility() const =0
virtual void SetSelectedPosition(const mitk::Point3D &newPosition, const QString &widgetName)=0