[vtkusers] update,interact and render in different threads

David Lonie david.lonie at kitware.com
Wed Jan 4 16:19:32 EST 2017

On Wed, Jan 4, 2017 at 4:16 PM, Antonio Fortino <thoniorf at gmail.com> wrote:

> Thank you David for your help.
> So i have to store two copy of my data one for the rendering thread and
> one for background(worker) thread, right?
> what if I have a polydata with something like 300 000 cells ? could be a
> big problem ?

You should be able to get away with using a ShallowCopy, which will share
the underlying data arrays between the source and target datasets -- that
will help keep memory usage feasible.

But yes, while it's computing the results you'll need to store the final
polydata twice in memory, once for the rendering thread and once for the
background thread. Once the background update completes, you can
shallowcopy the background dataset into the rendering dataset and then
you'll only have a single copy in memory.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170104/8d2ca053/attachment.html>

More information about the vtkusers mailing list