Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkOverlayController.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 QmitkOverlayController_h
14 #define QmitkOverlayController_h
15 
16 // MITK-Stuff
17 #include <QmitkOverlay.h>
18 #include <mitkCommon.h>
19 #include <mitkPropertyList.h>
20 
21 #include <QObject>
22 
23 #include <string>
24 
25 #include <MitkQtOverlaysExports.h>
26 
27 class QmitkRenderWindow;
28 
53 {
54  Q_OBJECT
55 
56 public:
67 
70 
80  void AddOverlay(QmitkOverlay* overlay);
81 
90  void RemoveOverlay(QmitkOverlay* overlay);
91 
98 
103  void SetOverlayVisibility(bool visible);
104 
110 
111 public slots:
118 
124 
129 
135 
136 protected:
146 
150  virtual void AlignOverlays();
151 
156 
158 
160 
161  typedef std::map<QmitkOverlay::DisplayPosition, QWidget *> OverlayPositionMap;
162  typedef std::vector<QmitkOverlay *> OverlayVector;
163 
168 
173 
178 
182  mitk::PropertyList::Pointer m_PropertyList;
183 };
184 
185 #endif
#define MITKQTOVERLAYS_EXPORT
controller that manages the positioning and stacking of QmitkOverlays
std::map< QmitkOverlay::DisplayPosition, QWidget * > OverlayPositionMap
void InitializeWidget(QmitkOverlay::DisplayPosition pos)
initializes one QWidget - internally used by InitializeOverlayLayout()
void RestackOverlays(QmitkOverlay::DisplayPosition pos)
mitk::PropertyList::Pointer m_PropertyList
PropertyList for RenderWindow-specific properties.
void AdjustOverlayPosition(QmitkOverlay::DisplayPosition displayPosition)
Repositions the overlay container widget at the specified display position.
QSize GetMinimumSizeForWidget(QmitkOverlay::DisplayPosition displayPosition)
void InitializeOverlayLayout()
setting up the widgets that will hold all overlays
QmitkRenderWindow * m_RenderWindow
RenderWindow that all Overlays will be added to.
OverlayPositionMap m_PositionedOverlays
all possible positions and the QWidgets representing the corresponding QmitkOverlays
void AdjustAllOverlayPosition()
Repositions all overlay container widgets to match the current render window geometry.
OverlayVector m_AllOverlays
all QmitkOverlays that are currently added
void RemoveOverlay(QmitkOverlay *overlay)
Removes a specific overlay from the render window.
void AddOverlay(QmitkOverlay *overlay)
Adds an overlay to the managed render window.
QmitkOverlayController(QmitkRenderWindow *rw, mitk::PropertyList *pl=nullptr)
Constructor.
virtual void AlignOverlays()
re-aligning the overlays - not implemented yet
void UpdateOverlayData(QmitkOverlay *overlay)
Updates the data of a single overlay and readjusts its position.
void SetOverlayVisibility(bool visible)
Sets the visibility of all overlay container widgets and their contents.
~QmitkOverlayController() override
Destructor.
std::vector< QmitkOverlay * > OverlayVector
void UpdateAllOverlays()
Updates the data of all managed overlays by calling their GenerateData() methods.
void RemoveAllOverlays()
Removes all overlays from the render window.
void SetPropertyList(mitk::PropertyList *pl)
Sets the render-window-specific PropertyList.
Abstract base class for all Qt-based overlay widgets in MITK.
Definition: QmitkOverlay.h:55
DisplayPosition
Enumeration of all possible display positions in a render window.
Definition: QmitkOverlay.h:67
MITK implementation of the QVTKWidget.
Key-value list holding instances of BaseProperty.