Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkRenderWindow Class Reference

MITK implementation of the QVTKWidget. More...

#include <QmitkRenderWindow.h>

Inheritance diagram for QmitkRenderWindow:
Collaboration diagram for QmitkRenderWindow:

Signals

void LayoutDesignChanged (QmitkRenderWindowMenu::LayoutDesign)
 
void ResetView ()
 
void ResetGeometry ()
 
void CrosshairRotationModeChanged (int)
 
void CrosshairVisibilityChanged (bool)
 
void Crosshair3DVisibilityChanged (bool)
 
void moved ()
 
void NodesDropped (QmitkRenderWindow *thisWindow, std::vector< mitk::DataNode * > nodes)
 Emits a signal to say that this window has had the following nodes dropped on it. More...
 

Public Member Functions

 QmitkRenderWindow (QWidget *parent=nullptr, const QString &name="unnamed renderwindow", mitk::VtkPropRenderer *renderer=nullptr)
 
 ~QmitkRenderWindow () override
 
virtual void SetResendQtEvents (bool resend)
 Whether Qt events should be passed to parent (default: true) More...
 
void SetLayoutIndex (QmitkRenderWindowMenu::LayoutIndex layoutIndex)
 Sets the layout index to define the layout type. More...
 
QmitkRenderWindowMenu::LayoutIndex GetLayoutIndex ()
 Returns the current layout index. More...
 
void UpdateLayoutDesignList (QmitkRenderWindowMenu::LayoutDesign layoutDesign)
 Updates the layout design list in the menu widget when the layout has changed. More...
 
void UpdateCrosshairVisibility (bool visible)
 Updates the crosshair visibility state in the menu widget. More...
 
void UpdateCrosshair3DVisibility (bool visible)
 Updates the 3D-only crosshair visibility state in the menu widget. More...
 
void UpdateCrosshairRotationMode (int mode)
 Updates the crosshair rotation mode in the menu widget. More...
 
void ActivateMenuWidget (bool state)
 Activates or deactivates the render window menu widget. More...
 
bool GetActivateMenuWidgetFlag ()
 Returns whether the menu widget is activated. More...
 
void ShowOverlayMessage (bool show)
 Shows or hides the geometry violation warning overlay. More...
 
vtkRenderWindow * GetVtkRenderWindow () override
 Returns the underlying VTK render window. More...
 
vtkRenderWindowInteractor * GetVtkRenderWindowInteractor () override
 Returns nullptr since no interactor is used. More...
 
- Public Member Functions inherited from mitk::RenderWindowBase
virtual ~RenderWindowBase ()
 Virtual destructor. More...
 
void InitRenderer ()
 Initializes the renderer associated with this render window. More...
 
virtual mitk::SliceNavigationController * GetSliceNavigationController ()
 Returns the SliceNavigationController for navigating through slices. More...
 
virtual mitk::CameraRotationController * GetCameraRotationController ()
 Returns the CameraRotationController for 3D camera rotation. More...
 
virtual mitk::BaseController * GetController ()
 Returns the appropriate controller for the current mapper mode. More...
 
virtual mitk::VtkPropRenderer * GetRenderer ()
 Returns the VtkPropRenderer associated with this render window. More...
 
virtual bool HandleEvent (InteractionEvent *interactionEvent)
 Dispatches an interaction event to the renderer's event dispatcher. More...
 

Protected Member Functions

bool event (QEvent *e) override
 
void moveEvent (QMoveEvent *event) override
 
void showEvent (QShowEvent *event) override
 
void enterEvent (QEnterEvent *) override
 
void leaveEvent (QEvent *) override
 
void resizeGL (int w, int h) override
 
void dragEnterEvent (QDragEnterEvent *event) override
 Simply says we accept the event type. More...
 
void dropEvent (QDropEvent *event) override
 If the dropped type is application/x-mitk-datanodes we process the request by converting to mitk::DataNode pointers and emitting the NodesDropped signal. More...
 
- Protected Member Functions inherited from mitk::RenderWindowBase
 RenderWindowBase ()
 Constructor. More...
 
void Initialize (const char *name="unnamed renderer")
 Initializes the renderer and adds it to the RenderingManager. More...
 
void Destroy ()
 Tears down the renderer and removes it from the RenderingManager. More...
 

Additional Inherited Members

- Protected Attributes inherited from mitk::RenderWindowBase
mitk::VtkPropRenderer::Pointer m_Renderer
 
vtkMitkRenderProp * m_RenderProp
 
bool m_InResize
 

Detailed Description

MITK implementation of the QVTKWidget.

Definition at line 38 of file QmitkRenderWindow.h.

Constructor & Destructor Documentation

◆ QmitkRenderWindow()

QmitkRenderWindow::QmitkRenderWindow ( QWidget *  parent = nullptr,
const QString &  name = "unnamed renderwindow",
mitk::VtkPropRenderer *  renderer = nullptr 
)

◆ ~QmitkRenderWindow()

QmitkRenderWindow::~QmitkRenderWindow ( )
override

Member Function Documentation

◆ ActivateMenuWidget()

void QmitkRenderWindow::ActivateMenuWidget ( bool  state)

Activates or deactivates the render window menu widget.

Parameters
[in]stateTrue to activate the menu, false to deactivate.

◆ Crosshair3DVisibilityChanged

void QmitkRenderWindow::Crosshair3DVisibilityChanged ( bool  )
signal

◆ CrosshairRotationModeChanged

void QmitkRenderWindow::CrosshairRotationModeChanged ( int  )
signal

◆ CrosshairVisibilityChanged

void QmitkRenderWindow::CrosshairVisibilityChanged ( bool  )
signal

◆ dragEnterEvent()

void QmitkRenderWindow::dragEnterEvent ( QDragEnterEvent *  event)
overrideprotected

Simply says we accept the event type.

◆ dropEvent()

void QmitkRenderWindow::dropEvent ( QDropEvent *  event)
overrideprotected

If the dropped type is application/x-mitk-datanodes we process the request by converting to mitk::DataNode pointers and emitting the NodesDropped signal.

◆ enterEvent()

void QmitkRenderWindow::enterEvent ( QEnterEvent *  )
overrideprotected

◆ event()

bool QmitkRenderWindow::event ( QEvent *  e)
overrideprotected

◆ GetActivateMenuWidgetFlag()

bool QmitkRenderWindow::GetActivateMenuWidgetFlag ( )
inline

Returns whether the menu widget is activated.

Definition at line 107 of file QmitkRenderWindow.h.

◆ GetLayoutIndex()

QmitkRenderWindowMenu::LayoutIndex QmitkRenderWindow::GetLayoutIndex ( )

Returns the current layout index.

◆ GetVtkRenderWindow()

vtkRenderWindow* QmitkRenderWindow::GetVtkRenderWindow ( )
inlineoverridevirtual

Returns the underlying VTK render window.

Implements mitk::RenderWindowBase.

Definition at line 116 of file QmitkRenderWindow.h.

◆ GetVtkRenderWindowInteractor()

vtkRenderWindowInteractor* QmitkRenderWindow::GetVtkRenderWindowInteractor ( )
inlineoverridevirtual

Returns nullptr since no interactor is used.

Implements mitk::RenderWindowBase.

Definition at line 119 of file QmitkRenderWindow.h.

◆ LayoutDesignChanged

void QmitkRenderWindow::LayoutDesignChanged ( QmitkRenderWindowMenu::LayoutDesign  )
signal

◆ leaveEvent()

void QmitkRenderWindow::leaveEvent ( QEvent *  )
overrideprotected

◆ moved

void QmitkRenderWindow::moved ( )
signal

◆ moveEvent()

void QmitkRenderWindow::moveEvent ( QMoveEvent *  event)
overrideprotected

◆ NodesDropped

void QmitkRenderWindow::NodesDropped ( QmitkRenderWindow *  thisWindow,
std::vector< mitk::DataNode * >  nodes 
)
signal

Emits a signal to say that this window has had the following nodes dropped on it.

◆ ResetGeometry

void QmitkRenderWindow::ResetGeometry ( )
signal

◆ ResetView

void QmitkRenderWindow::ResetView ( )
signal

◆ resizeGL()

void QmitkRenderWindow::resizeGL ( int  w,
int  h 
)
overrideprotected

◆ SetLayoutIndex()

void QmitkRenderWindow::SetLayoutIndex ( QmitkRenderWindowMenu::LayoutIndex  layoutIndex)

Sets the layout index to define the layout type.

Parameters
[in]layoutIndexThe layout index to set.

◆ SetResendQtEvents()

virtual void QmitkRenderWindow::SetResendQtEvents ( bool  resend)
virtual

Whether Qt events should be passed to parent (default: true)

With introduction of the QVTKWidget the behaviour regarding Qt events changed. QVTKWidget "accepts" Qt events like mouse clicks (i.e. set an "accepted" flag). When this flag is set, Qt fininshed handling of this event – otherwise it is reached through to the widget's parent.

This reaching through to the parent was implicitly required by QmitkMaterialWidget / QmitkMaterialShowCase.

The default behaviour of QmitkRenderWindow is now to clear the "accepted" flag of Qt events after they were handled by QVTKWidget. This way parents can also handle events.

If you don't want this behaviour, call SetResendQtEvents(true) on your render window.

◆ showEvent()

void QmitkRenderWindow::showEvent ( QShowEvent *  event)
overrideprotected

◆ ShowOverlayMessage()

void QmitkRenderWindow::ShowOverlayMessage ( bool  show)

Shows or hides the geometry violation warning overlay.

Parameters
[in]showTrue to show, false to hide.

◆ UpdateCrosshair3DVisibility()

void QmitkRenderWindow::UpdateCrosshair3DVisibility ( bool  visible)

Updates the 3D-only crosshair visibility state in the menu widget.

Parameters
[in]visibleTrue to show the crosshair in the 3D render window, false to hide it.

◆ UpdateCrosshairRotationMode()

void QmitkRenderWindow::UpdateCrosshairRotationMode ( int  mode)

Updates the crosshair rotation mode in the menu widget.

Parameters
[in]modeThe new rotation mode.

◆ UpdateCrosshairVisibility()

void QmitkRenderWindow::UpdateCrosshairVisibility ( bool  visible)

Updates the crosshair visibility state in the menu widget.

Parameters
[in]visibleTrue to show the crosshair, false to hide it.

◆ UpdateLayoutDesignList()

void QmitkRenderWindow::UpdateLayoutDesignList ( QmitkRenderWindowMenu::LayoutDesign  layoutDesign)

Updates the layout design list in the menu widget when the layout has changed.

Parameters
[in]layoutDesignThe new layout design.

The documentation for this class was generated from the following file: