<div>This is a nice page explaining how threading in ITK works </div><a href="http://www.itk.org/Doxygen/html/ThreadingPage.html">http://www.itk.org/Doxygen/html/ThreadingPage.html</a><br><br>Cagatay<div><br><div class="gmail_quote">
On Wed, Oct 10, 2012 at 6:12 AM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hello, <div><br></div><div>If you want to implement a single threaded ImageFilter you over-ride the GenerateData() method, if you want to implement a multi-threaded filter you over-ride the ThreadedGenerateData() method and optionally the BeforeThreadedGenerateData,() or the AfterThreadedGenerateData() methods. The ImageSource class over-rides the GenerateData() method to split the image and multi-thread the processing:</div>
<div><br></div><div><a href="https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/include/itkImageSource.hxx#L251" target="_blank">https://github.com/Kitware/ITK/blob/master/Modules/Core/Common/include/itkImageSource.hxx#L251</a></div>
<div><br></div><div>For multi-threaded filters this ThreadedGenerateData() methods should produce the output region that is passed as a parameter, which the single threaded GenerateData() method should produce the output image(s)' requested regions.</div>
<div><br></div><div>The general guideline is to file an image filter which does a similar operation and use it as a model for implementing your own filter.</div><div><br></div><div>Brad</div><div><div class="h5"><div><br>
<div><div>On Oct 10, 2012, at 6:09 AM, Dženan Zukić <<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>> wrote:</div><br><blockquote type="cite"><font><font face="verdana,sans-serif">Take a look at these simple examples:</font></font><div>
<a href="http://www.itk.org/Wiki/ITK/Examples/Developer/MultiThreadedImageFilter" target="_blank">http://www.itk.org/Wiki/ITK/Examples/Developer/MultiThreadedImageFilter</a><font face="verdana, sans-serif"><br>
</font><div><a href="http://www.itk.org/Wiki/ITK/Examples/Developer/OilPaintingImageFilter" target="_blank">http://www.itk.org/Wiki/ITK/Examples/Developer/OilPaintingImageFilter</a></div><div><font><br></font><br><div class="gmail_quote">
On Wed, Oct 10, 2012 at 7:40 AM, Ashwath Hegde, ERS-HCLTech <span dir="ltr"><<a href="mailto:Ashwathh@hcl.com" target="_blank">Ashwathh@hcl.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Hi All,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I am new to ITK.I have written some image processing algorithms like binarization,contrast enchancement etc in C.<u></u><u></u></p>
<p class="MsoNormal">I want to apply threading concept on the algorithms which I have written in C so that they execute faster.<u></u><u></u></p><p class="MsoNormal">So I wanted to know how multithreading is applied on various filters in ITK,so that I can apply the same concept on my C algorithms.<u></u><u></u></p>
<p class="MsoNormal">I debugged the example “FlipImageFilter.cxx” to see if it was multithreaded but could find out much.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Kindly help me in this.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Regards,<u></u><u></u></p><p class="MsoNormal">Ashwath<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div><span style="FONT-FAMILY:'Arial','sans-serif';COLOR:gray;FONT-SIZE:7.5pt"><div style="margin:0in 0in 0pt">
<br><br><font style="FONT-FAMILY:'Arial','sans-serif';COLOR:gray;FONT-SIZE:9px">::DISCLAIMER::<br>----------------------------------------------------------------------------------------------------------------------------------------------------</font></div>
<div style="margin:0in 0in 0pt"><font style="FONT-FAMILY:'Arial','sans-serif';COLOR:gray;FONT-SIZE:11px">The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.<br>
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, <br>lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents <br>
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. <br>Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the <br>
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, <br>distribution and / or publication of this message without the prior written consent of authorized representative of <br>
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. <br>Before opening any email and/or attachments, please check them for viruses and other defects.</font></div>
<div style="margin:0in 0in 0pt"><font style="FONT-FAMILY:'Arial','sans-serif';COLOR:gray;FONT-SIZE:11px">----------------------------------------------------------------------------------------------------------------------------------------------------</font></div>
</span></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<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br></div></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<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cemal Cagatay Bilgin</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Life Sciences Division</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Lawrence Berkeley National Lab</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">MS977, One Cyclotron Road</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Berkeley, CA 94720, USA</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Email: ccbilgin</span><a href="mailto:hchang@lbl.gov" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">@lbl.gov</a><br>
</div>