VTK in a multi-threaded application ??

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

VTK in a multi-threaded application ??

abhishek
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.
Reply | Threaded
Open this post in threaded view
|

Re: VTK in a multi-threaded application ??

Sebastien Jourdain-2
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 <[hidden email]> 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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: VTK in a multi-threaded application ??

abhishek
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 <[hidden email]> 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: VTK in a multi-threaded application ??

Sebastien Jourdain-2
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:%2B91-9986919320" value="+919986919320" target="_blank">+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
Reply | Threaded
Open this post in threaded view
|

Re: VTK in a multi-threaded application ??

Bill Lorensen
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: <a href="tel:%2B91-9986919320" value="+919986919320" target="_blank">+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

_______________________________________________
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