[vtkusers] interactor with one renwin and multiple renderers
Róbert Špir
spir.robert at gmail.com
Sat Dec 10 10:01:57 EST 2016
I have two main renderers and two overlay renderers. The main renderers
contain multiple actors with 100+ k polygons and volume rendering and
everything is fast and without delay (on nvidia gtx770). I'm also using
point picking that calls FindPokedRenderer on every mouse move without any
problems.
Which os and qt version are you using? There is some problem with qt 5.5 in
latest ubuntu that is causing delays with mouse interection. I'm using qt5.7
from https://launchpad.net/~beineri/+archive/ubuntu/opt-qt57-xenial
Robert
From: Miroslav Drahos [mailto:mdrahos at aurisrobotics.com]
Sent: Friday, December 9, 2016 10:27 PM
To: Róbert Špir <spir.robert at gmail.com>; vtkusers at vtk.org
Subject: Re: [vtkusers] interactor with one renwin and multiple renderers
Hi Robert,
thanks for the reply, it makes sense. From your experience, would you say it
is worth the effort for ~6 views? Would you say the performance improvement
is noticeable and worth the extra effort? I did some experiments, and I get
a bit of a delay on interaction; between the mouse down and the scene
starting to rotate (using stock vtkInteractorStyleTrackballCamera for now).
I am guessing it may be the FindPokedRenderer() taking time to figure out
which renderer the interaction falls into... Some of my viewports also have
a vtkOrientationMarkerWidget, which creates its own renderer, and a couple
views have overlay (non-interactive) renderer as well, so the total number
of renderers is even higher, maybe 12 altogether.
Thank you!
Miro
_____
From: Róbert Špir <spir.robert at gmail.com <mailto:spir.robert at gmail.com> >
Sent: Thursday, December 8, 2016 8:49:10 PM
To: Miroslav Drahos; vtkusers at vtk.org <mailto:vtkusers at vtk.org>
Subject: RE: [vtkusers] interactor with one renwin and multiple renderers
Hi Miro,
I'm doing similar task. You can derive your own interactorstyle class from
one of the vtkInteractorStyle classes. There you can override mouse and key
event functions and using this->Interactor->FindPokedRenderer(mouseX,
mouseY); you can detect to which of the multiple renderers the user clicked
and handle the interaction according to your needs.
Robert
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Miroslav
Drahos
Sent: Thursday, December 8, 2016 10:44 PM
To: vtkusers at vtk.org <mailto:vtkusers at vtk.org>
Subject: [vtkusers] interactor with one renwin and multiple renderers
Hi VTK folks,
I am trying to optimize my application, and am thinking to replace multiple
QVTKWidget2 instances with only one widget + multiple viewports/renderers.
Then I could issue only one expensive call to vtkRenderWindow::Render() and
re-draw everything.
I saw the example for multiple viewports
(http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports)
and it all looks very straightforward, but...
How do I handle interaction? Let's say in a typical quad view setup of a
medical application, with 3 orthogonal slices and one 3D view there are
different interactor styles needed. But it is the renderwindow that provides
interactor, so in the tiled version I would end up with only one common
interactor/interactor style.
Any advice is greatly appreciated!
Miro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161210/560be48d/attachment.html>
More information about the vtkusers
mailing list