[vtkusers] vkt and threading
Cory Quammen
cory.quammen at kitware.com
Fri Sep 25 08:38:10 EDT 2015
Hi Dejan,
Please keep your questions on the mailing list so that others may
contribute to and benefit from the conversation.
I don't know that much about setting up different threads for doing
different tasks in VTK. Perhaps someone who has more experience can chime
in.
Thanks,
Cory
On Fri, Sep 25, 2015 at 4:03 AM, Dejan Zivkovic <dejan.zivkovic90 at gmail.com>
wrote:
> Hi Cory,
>
> Thanks for the answer. I would like to ask another question about this.
>
> Lets say we have
> operation A: vtk import of mesh data (expensive operation)
> operation B: qt splash screen with animated vtk widget
>
> A and B must work in parallel. Operation A should work in main thread,
> because of vtk non-thread safety, so that means that B must at least
> do the vtk animation in other thread, but that is undesirable, right?
>
> How to solve this kind of situation?
> Is it actually possible to load some data using vtk
> and do some animation in vtk in the "same time"?
>
> Thanks,
> Dejan
>
> On Thu, Sep 24, 2015 at 4:23 PM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>
>> Dejan,
>>
>> If you can, it is not easy to get right. In general, you have to be very
>> careful when multithreading with VTK. While some parts of VTK are thread
>> safe, most are not.
>>
>> In projects I've encountered, VTK runs in the main thread and run
>> potentially long-running processing tasks on other threads.
>>
>> HTH,
>> Cory
>>
>>
>> On Thu, Sep 24, 2015 at 5:06 AM, Dejan Zivkovic <
>> dejan.zivkovic90 at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Is it possible to update and render
>>> vtk scene from non-main thread?
>>>
>>> Thanks,
>>> Dejan
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>
>>>
>>
>>
>> --
>> Cory Quammen
>> R&D Engineer
>> Kitware, Inc.
>>
>
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150925/0f436e16/attachment.html>
More information about the vtkusers
mailing list