[vtkusers] VTK in a multi-threaded program
Aashish Chaudhary
aashish.chaudhary at kitware.com
Mon Mar 24 10:32:12 EDT 2014
Hi Richard,
On Mon, Mar 24, 2014 at 10:25 AM, Richard Whitehead <
richard.whitehead at vivosight.com> wrote:
> David,
> Unfortunately I am now in a really bad place. I have some long-winded
> calculations to do and then visualise, which I want to do in a background
> thread. This is for a commercial application and hanging the GUI is
> completely unacceptable. I have now invested several man-months into VTK
> and I have to decide whether to drop it. I think the only sensible thing I
> can do is to get rid of VTK from my calculations and only use it for
> visualisation.
>
FYI, we have successfully used VTK in a multi-threaded environment for our
VisGUI application framework (http://www.kitware.com/source/home/post/84)
specifically dealing with computations. Rendering was done single threaded
though. The trick involved writing our own thread safe version of
vtkSmartPointer (I believe you are doing something similar).
- Aashish
> Many thanks,
> Richard
>
>
>
> On 24 March 2014 12:29, David Cole <dlrdave at aol.com> wrote:
>
>> You are definitely not going crazy. The really, really rather foul thing,
>> that frustrates me all the time, is when I must do some VTK operation which
>> takes significant time (on the order of seconds or minutes, rather than the
>> typical fraction of a second) ... and then it makes the GUI completely
>> unresponsive until the operation is done.
>>
>> I spend rather a lot of my time making sure that everything I do that's
>> VTK-based is at interactive speeds as much as possible to absolutely
>> minimize the user pain associated with this.
>>
>> Pushing long operations completely into a separate non-GUI thread would
>> be absolutely fantastic. I look forward to the day when such a thing
>> becomes possible.
>>
>>
>> :-)
>> D
>>
>>
>
>
> --
>
> Richard Whitehead *-* Senior Imaging Engineer
>
> *Michelson Diagnostics Ltd*
>
> *M:* +44 (0)7905 955276 *T:* +44 (0)20 8308 1695
>
> *E: *richard.whitehead at vivosight.com *W:* www.vivosight.com
>
>
> <http://www.vivosight.com/>
>
>
> Michelson Diagnostics Ltd, 1 Grays Farm Production Village, Grays Farm
> Road, Orpington, Kent BR5 3BD, UK
>
> Registered Office: 3 Shearwater, Maidstone, ME16 0DW. Registered in
> England No. 5732681
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140324/908932c6/attachment.html>
More information about the vtkusers
mailing list