[vtkusers] VTK in a multi-threaded application ??
Bill Lorensen
bill.lorensen at gmail.com
Tue Aug 6 10:19:13 EDT 2013
If you specify multiple contour values, then it looks like ContourFilter
uses multi threading.
Also, as mentioned in the documentation, if you are extracting multiple
contours, then try UseScalarTreeOn(). This may improve the speed.
On Tue, Aug 6, 2013 at 9:54 AM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:
> Does the contour filter not already use thread for each of its contour
> value?
>
> if not, you can create 10 vtkContourFilter in the main thread and call
> Update in // then once ALL of them are done, you can merge the results and
> strip it all that in the main thread...
>
> Seb
>
>
> On Tue, Aug 6, 2013 at 8:43 AM, Abhishek Gupta <abhishek at meddiff.com>wrote:
>
>> Hello Sebastien,
>>
>> I am using above said classes for generating contour lines at 10
>> different level from RT-Dose data for 100+ CT-Images during initial
>> loading.
>>
>> Doing them sequentially takes a bit of time. So, I thought of
>> multi-threading that piece of code to generate contours for all the 10
>> levels together.
>>
>> I did implement it and got error with vtkFiltering.dll
>>
>> Can you suggest which part of my code should i concentrate on, if I have
>> to multi-thread it?? I can share my code, if you wish to have a look at it?
>>
>>
>>
>> On Tue, Aug 6, 2013 at 5:58 PM, Sebastien Jourdain <
>> sebastien.jourdain at kitware.com> wrote:
>>
>>> Hi Abhishek,
>>>
>>> you can use all VTK in a threaded environment but VTK is NOT thread safe
>>> therefore you need to understand what you are doing and if concurrency
>>> arise and on what.
>>>
>>> So the answer is YES and NO, because it highly depends on what you are
>>> doing...
>>>
>>> Seb
>>>
>>>
>>> On Tue, Aug 6, 2013 at 6:44 AM, abhishek <abhishek at meddiff.com> wrote:
>>>
>>>> Hello Users,
>>>>
>>>> How can I use the following vtk classes in a multi-threaded application
>>>> ??
>>>>
>>>> Classes that i want to use:
>>>> 1. vtkImageData
>>>> 2. vtkContourFilter
>>>> 3. vtkStripper
>>>>
>>>>
>>>> Regards
>>>> Abhishek.
>>>>
>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://vtk.1045678.n5.nabble.com/VTK-in-a-multi-threaded-application-tp5722504.html
>>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>>> _______________________________________________
>>>> 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
>>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>> *Abhishek Gupta*
>> *Technical Lead*
>> Meddiff Technologies Pvt. Ltd.
>> Mobile: +91-9986919320
>>
>
>
> _______________________________________________
> 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
>
>
--
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130806/45fef62f/attachment.htm>
More information about the vtkusers
mailing list