<div dir="ltr">If you specify multiple contour values, then it looks like ContourFilter uses multi threading.<div><br></div><div style>Also, as mentioned in the documentation, if you are extracting multiple contours, then try UseScalarTreeOn(). This may improve the speed.</div>
<div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 9:54 AM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does the contour filter not already use thread for each of its contour value?<div><br></div><div>if not, you can create 10 <span style="font-family:arial,sans-serif;font-size:13px">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...</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Seb</span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Tue, Aug 6, 2013 at 8:43 AM, Abhishek Gupta <span dir="ltr"><<a href="mailto:abhishek@meddiff.com" target="_blank">abhishek@meddiff.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello Sebastien,<div><br></div><div>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. </div><div><br></div><div>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.</div>
<div><br></div><div>I did implement it and got error with vtkFiltering.dll </div><div><br></div><div>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?</div>
<div><br></div></div><div class="gmail_extra"><div><div><br><br><div class="gmail_quote">On Tue, Aug 6, 2013 at 5:58 PM, Sebastien Jourdain <span dir="ltr"><<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13px">Abhishek,</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">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. </span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">So the answer is YES and NO, because it highly depends on what you are doing...</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Seb</span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Aug 6, 2013 at 6:44 AM, abhishek <span dir="ltr"><<a href="mailto:abhishek@meddiff.com" target="_blank">abhishek@meddiff.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Users,<br>
<br>
How can I use the following vtk classes in a multi-threaded application ??<br>
<br>
Classes that i want to use:<br>
1. vtkImageData<br>
2. vtkContourFilter<br>
3. vtkStripper<br>
<br>
<br>
Regards<br>
Abhishek.<br>
<br>
<br><span><font color="#888888">
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/VTK-in-a-multi-threaded-application-tp5722504.html" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-in-a-multi-threaded-application-tp5722504.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</font></span></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br>Regards,<br><b>Abhishek Gupta</b><br><i><font size="1">Technical Lead</font></i><br><font size="1">Meddiff Technologies Pvt. Ltd.<br>
Mobile: <a href="tel:%2B91-9986919320" value="+919986919320" target="_blank">+91-9986919320</a></font>
</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>