[vtk-developers] QVTKRenderWindowInteractor bug in Mac OS

David Gobbi david.gobbi at gmail.com
Wed Oct 31 13:27:36 EDT 2018


Hi Stas,

Here are a couple things to try to improve fps (no guarantees, though).

With QVTKRenderWindowInteractor, it is best to let Qt handle the
render calls, rather than calling Render() directly.  So try replacing
all of your calls to Render() with calls to self.update(), where 'self' is
the QVTKRenderWindowInteractor.  If you do not do this, then it is
possible that the Render() is hidden because it isn't associated with
a Qt paint operation. By calling update() on a Qt widget, you ensure
that Qt will call Render() synchronously with its paintEvent().

A second thing to try is to call Update() on your reader before using
its output.  Most readers will 'stream' which means that they only
read the slices that are requested by the VTK pipeline (possibly
causing the reader to re-execute on future pipeline requests),
unless you specifically call Update() which forces all the slices to be
read into memory at once.  Since your example only has one input
slice, I doubt that this is what is causing a slow-down for you, but it
is still a good habit when working with VTK readers.

  - David


On Wed, Oct 31, 2018 at 10:57 AM take5v <stas.truhan at gmail.com> wrote:

> Another issue but within the same context of mine toy example (script of
> which I posted above) is a slow fps during window/level change on Windows.
> This process is slow and laggy even during rendering the super small image
> of vtk.png from VTKData.
>
> CPU: GeForce GTX 680
> GPU: Intel i7-3770K
>
>
>
> -----
> Best regards,
> Stanislau Trukhan
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Dev-f1251487.html
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181031/8899f7b0/attachment.html>


More information about the vtk-developers mailing list