Page MenuHomePhabricator

Evaluate MITK/VTK Rendering by means of the QVTK2-Widget
Closed, InvalidPublic

Description

Recently, there has been some integration of VTK into the QGraphicsView mechanism (http://prashanthudupa.livejournal.com/48221.html).
This may allow for a seamless coexistence of (interactive & transparent) Qt Widgets and the VTK/MITK Rendering Pipeline.

Due to the almost completed work to re-enable a Qt independent rendering of MITK (see T4735), the above mentioned "vtkQtGraphicsViewRenderWindow" could be combined very straight forward with MITK.

In principle, all I did was to pass the vtkQtGraphicsViewRenderWindow as parameter to the constructor of the new QT-independent mitk::RenderWindow.

Attached, you can find:

  • A patch for the current OS-MITK including the above mentioned class, few minor modifications to rendering, and an adapted tutorial step 3
  • A screenshot of the step3 example showing an opaque widget in front of a MITK rendering, interaction of both, the widget and the rendering is working (although there is a crash on application exit in vtkMitkEventProvider)

To discuss/to investigate:

  • (How) does the Qt-initiated re-renderings affect efficiency/performance?
  • Due to the use of mitk::RenderWindow instead of QmitkRenderWindow, 'interaction-integration' now relies on the new vtkMitkEventProvider?
  • What about this change w.r.t. our QmitkTextOverlays and their behaviour on different OSes?
  • The role of the vtkQtGraphicsProxyWidget and its implementation

Event Timeline

baumhaue added a subscriber: baumhaue.

Current Open-Source MITK Patch

I believe that this task has been moved to your responsibility.

This bug was created to do some investigations on this topic in advance to the last MITK-Retreat.

If you have any questions feel free to ask me...

Resetting all bugs without active assignee flag to "CONFIRMED". Change status to IN_PROGRESS if you are working on it.

Thomas, nutzt MITK bereits das QVTK2 Widget, das mit VTK 5.8 eingeführt wurde?

Since only a few of us are using VTK 5.8, I assume that none of us checked the new widget.

Is like the QGraphicsView widget but with the QVTK widget interface?

Yes, QVTK2-Widget is just some other QT Integration of the VTK Rendering. It should not affect our rendering mechanism itself, but allow for better GUI integration of the rendering widgets along with up-to-date QT and VTK.

Sounds good. We can try that during one of the next bugsquashings.

Easy Todo:
Change the inheritence of QmitkRenderWindow from QVTKWidget to QVTKWidget2 and see if everything is still working as expected.

Updating target milestone to upcoming release

When I looked into this the last time (which was quite some time ago) the solution described by Matthias was different from what VTK has actually implemented!

The example that Matthias talks about uses a fusion of vtkRenderWindows and a QGraphicsView. This makes it easy to add QWidgets into the vtk rendering scene.

However, the new QVtkWidget2 is derived from the QGLWidget, which has nothing to do with QGraphicsView. As far as I have seen, the QGLWidget is a 'normal' QWidget that can paint inside its canvas using GL directly.

That's not really what we want. I think the QVTKWidget2 is still worth looking into!

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:33 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:37 PM
kislinsk removed a project: Bulk Edit.