Medical Imaging Interaction Toolkit  2023.04.00
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::AnatomicalPlane& orientation) const override;
40 
51  void InitializeViews(const mitk::TimeGeometry* geometry, bool resetCamera) override;
52 
57  void SetInteractionReferenceGeometry(const mitk::TimeGeometry* referenceGeometry) override;
58 
64  bool HasCoupledRenderWindows() const override;
65 
66  virtual void SetSelectedPosition(const mitk::Point3D& newPosition, const QString& widgetName) override;
67  virtual const mitk::Point3D GetSelectedPosition(const QString& widgetName) const override;
68 
69  virtual void SetCrosshairVisibility(bool) override;
70  virtual bool GetCrosshairVisibility() const override;
71  void SetCrosshairGap(unsigned int gapSize) override;
72 
73  virtual void ResetCrosshair() override;
74 
75  virtual void SetWidgetPlaneMode(int mode) override;
76 
77  mitk::SliceNavigationController* GetTimeNavigationController();
78 
79  void AddPlanesToDataStorage();
80  void RemovePlanesFromDataStorage();
81 
87  QmitkRenderWindow* GetRenderWindow(unsigned int number) const;
88  QmitkRenderWindow* GetRenderWindow1() const;
89  QmitkRenderWindow* GetRenderWindow2() const;
90  QmitkRenderWindow* GetRenderWindow3() const;
91  QmitkRenderWindow* GetRenderWindow4() const;
92 
98  mitk::DataNode::Pointer GetWidgetPlane(unsigned int number) const;
99  mitk::DataNode::Pointer GetWidgetPlane1() const;
100  mitk::DataNode::Pointer GetWidgetPlane2() const;
101  mitk::DataNode::Pointer GetWidgetPlane3() const;
102 
111  void SetDecorationColor(unsigned int widgetNumber, mitk::Color color);
117  mitk::Color GetDecorationColor(unsigned int widgetNumber);
118 
119 public Q_SLOTS:
120 
121  // mouse events
122  virtual void mousePressEvent(QMouseEvent*) override;
123  virtual void moveEvent(QMoveEvent* e) override;
124  virtual void wheelEvent(QWheelEvent* e) override;
125 
126  void Fit();
127 
128  void AddDisplayPlaneSubTree();
129 
130  void EnsureDisplayContainsPoint(mitk::BaseRenderer *renderer, const mitk::Point3D &p);
131 
132  void SetWidgetPlaneVisibility(const char *widgetName, bool visible, mitk::BaseRenderer *renderer = nullptr);
133 
134  void SetWidgetPlanesVisibility(bool visible, mitk::BaseRenderer *renderer = nullptr);
135 
136 Q_SIGNALS:
137 
138  void NotifyCrosshairVisibilityChanged(bool visible);
139  void NotifyCrosshairRotationModeChanged(int mode);
140 
141  void WheelMoved(QWheelEvent *);
142  void Moved();
143 
144 private:
145 
146  virtual void SetLayoutImpl() override;
147  virtual void SetInteractionSchemeImpl() override { }
148 
149  void CreateRenderWindowWidgets();
150 
151  mitk::SliceNavigationController* m_TimeNavigationController;
152 
156  mitk::DataNode::Pointer m_PlaneNode1;
157  mitk::DataNode::Pointer m_PlaneNode2;
158  mitk::DataNode::Pointer m_PlaneNode3;
159 
164  mitk::DataNode::Pointer m_ParentNodeForGeometryPlanes;
165 
172  mitk::Color m_DecorationColorWidget4;
173 
174 };
175 
176 #endif
QmitkStdMultiWidget
The 'QmitkStdMultiWidget' is a 'QmitkAbstractMultiWidget' that is used to display multiple render win...
Definition: QmitkStdMultiWidget.h:24
mitk::TimeGeometry
Definition: mitkTimeGeometry.h:43
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkAbstractMultiWidget::InitializeViews
virtual void InitializeViews(const mitk::TimeGeometry *geometry, bool resetCamera)=0
Initialize the render windows of the concrete multi widget to the given geometry.
QmitkAbstractMultiWidget::SetInteractionReferenceGeometry
virtual void SetInteractionReferenceGeometry(const mitk::TimeGeometry *referenceGeometry)=0
Define the reference geometry for interaction withing a render window.
QmitkAbstractMultiWidget::SetSelectedPosition
virtual void SetSelectedPosition(const mitk::Point3D &newPosition, const QString &widgetName)=0
QmitkAbstractMultiWidget::ResetCrosshair
virtual void ResetCrosshair()=0
mitk::Color
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
Definition: mitkColorProperty.h:35
QmitkAbstractMultiWidget::SetWidgetPlaneMode
virtual void SetWidgetPlaneMode(int mode)=0
itk::SmartPointer< Self >
QmitkRenderWindow
MITK implementation of the QVTKWidget.
Definition: QmitkRenderWindow.h:38
QmitkAbstractMultiWidget::SetCrosshairVisibility
virtual void SetCrosshairVisibility(bool visible)=0
QmitkAbstractMultiWidget::GetSelectedPosition
virtual const mitk::Point3D GetSelectedPosition(const QString &widgetName) const =0
QmitkAbstractMultiWidget::InitializeMultiWidget
virtual void InitializeMultiWidget()=0
mitk::SliceNavigationController
Controls the selection of the slice the associated BaseRenderer will display.
Definition: mitkSliceNavigationController.h:132
QmitkAbstractMultiWidget::GetCrosshairVisibility
virtual bool GetCrosshairVisibility() const =0
QmitkAbstractMultiWidget::GetRenderWindow
QmitkRenderWindow * GetRenderWindow(int row, int column) const
QmitkAbstractMultiWidget.h
mitk::AnatomicalPlane
AnatomicalPlane
Definition: mitkAnatomicalPlanes.h:18
mitk::Point< ScalarType, 3 >
MitkQtWidgetsExports.h
QmitkAbstractMultiWidget::HasCoupledRenderWindows
virtual bool HasCoupledRenderWindows() const =0
Returns true if the render windows are coupled; false if not.
QmitkAbstractMultiWidget
The 'QmitkAbstractMultiWidget' is a 'QWidget' that can be subclassed to display multiple render windo...
Definition: QmitkAbstractMultiWidget.h:53
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:55
QmitkAbstractMultiWidget::SetCrosshairGap
virtual void SetCrosshairGap(unsigned int gapSize)=0