Page MenuHomePhabricator

Qt-independent render window example
Closed, ResolvedPublic

Description

Create an example of a MITK rendering in a basic vtkRenderWindow.

Event Timeline

Rendering so far is no big problem.

MITK interaction integration also has to be moved from QVTKWidget (QT) to 'native' VTK

[SVN revision 24830]
ENH (#4735): QT independent rendering with MITK_CORE_EXPORT

  • separated code from the QmitkRenderWindow into an abstract base
  • introduced a QT independent mitkRenderWindow
  • introduced a vtkEventProvider that inherits from vtkInteractorObserver and generates MITK events coming from VTK
  • introduced a convenience helper class: mitkVtkEventAdapter to transform VTK event data into the MITK interaction concept
  • added a tutorial step (9) to show the use and rendering of MITK without QT dependency

Current status of this bug:

  • Integration of MITK Rendering in 3D widgets complete / rendering of the DataStorage contents works.
  • Integration of MITK event/interaction mechanism into VTK is implemented. Basically, this works but:
    • Mapping of VTK event data to the QT-LIKE event data of MITK has to be verified (code in mitkVtkEventAdapter)
    • Widget resize event is currently not communicated to MITK. Maybe we have to observe the vtkRenderWindow and not the vtkRenWinInteractor for this purpose. BUT I don't know if this event is really required somewhere...
  • Still one major implementation task to do: The RenderingManager is currently only defined in a plattform independent way, but the implementation is QT.

Therefore, "rendering updates" aren't performed in 2D widgets

With this work right here, we go more than half way to rid of the IIL.
Or otherwise said: Dispensing IIL might be easier than doing qt-free integration of mitk rendering.

[SVN revision 24834]
ENH (#4735): QT independent rendering with MITK_CORE_EXPORT

  • removed wrong function definitions in header

[SVN revision 24838]
ENH (#4735): QT independent rendering with MITK_CORE_EXPORT

  • try to fix warnings

[SVN revision 24867]
CHG (#4735): method rename: mitk::RenderingManager::UpdateCallback -> ExecutePendingRequests

[SVN revision 24869]
CHG (#4735): moved the example for Qt-free rendering from the Tutorial to the Application/Tests directory

[SVN revision 24872]
FIX (#4735): correctly initialize ProcessWheelEvents

[SVN revision 24873]
FIX (#4735): removed obsolete methods from RenderWindow base class

[SVN revision 25339]
ENH (#4735):

  • added possibility to use an existing vtkRenderWindow within the MITK rendering pipeline
  • added the possibility to use named renderers. This simplifies the access to a renderer instance by means of GetRendererByName().

[SVN revision 25514]
CHG (#4735): clean up memory leaks

  • delete m_vtkRenderWindow in mitkRenderWindow
  • delete m_vtkRenderWindowInteractor in mitkRenderWindow
  • delete m_vtkMitkEventProvider in mitkRenderWindow.cpp

[SVN revision 26473]
FIX (#4735): fixed naming issue of render window

[SVN revision 26774]
FIX (#4735): fixed interaction issues in non-qt mitk

[SVN revision 26803]
ENH (#4735): enhanced the qt free render window example to reflect some little simplified QmitkStdMultiWidget behaviour.

[SVN revision 26857]
ENH (#4735): added std::map to store mouse button state during mouse move interaction

vtkRenderWindowInteractor does not provide information about mouse buttons during
mouse move events...

Some button action might be going on during mouse move events that needs to be temp. saved in our buttonStateMap

Example is implemented and works, see ..\Applications\Tests\QtFreeRender

Limitation:

  • Interaction is now totally initiated out of the VTK interaction mechanism, however, MITK events are typically initiated by QT and partially processed before/instead of VTK processing.