Thank you for the prompt response Matt. If I understand correctly calculating all the derivatives in BeforeThreadedGenerateData and then implementing my measure in ThreadedGenerateData is the approach you are suggesting?<br>
<br>Cagatay <div><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 11:52 AM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Cagatay,<br>
<br>
It usually works better to compute ix, iy, iz, ixx, iyy, izz all in<br>
one thread, and partition the data for each thread by ImageRegion.<br>
<br>
HTH,<br>
Matt<br>
<div><div class="h5"><br>
On Thu, Nov 15, 2012 at 7:43 PM, Cagatay Bilgin <<a href="mailto:bilgincc@gmail.com">bilgincc@gmail.com</a>> wrote:<br>
> Lets say I am writing a filter that needs ix, iy, iz, ixx, iyy, izz to<br>
> compute some measure. Once I have the output of derivatives, I know how to<br>
> make my filter threaded. What I don't know is how to make use of threads to<br>
> compute the derivatives in parallel, 1 thread computing ix, another one<br>
> computing iy, another one ixx so and so forth. What would be the best ITK<br>
> approach to do this? The derivative filters might already be threaded, I am<br>
> using them just to illustrate the problem.<br>
><br>
> I guess I can also set the requested region of the derivative filters in<br>
> ThreadedGenerateData and then use the output of that to move on. Would that<br>
> be the way to go?<br>
><br>
> Cheers,<br>
> Cagatay<br>
><br>
> --<br>
> Cemal Cagatay Bilgin<br>
> Life Sciences Division<br>
> Lawrence Berkeley National Lab<br>
> MS977, One Cyclotron Road<br>
> Berkeley, CA 94720, USA<br>
> Email: <a href="mailto:ccbilgin@lbl.gov">ccbilgin@lbl.gov</a><br>
><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>
><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>