[Insight-users] itk threads

Cagatay Bilgin bilgincc at gmail.com
Thu Nov 15 21:15:42 EST 2012


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?

Cagatay

On Thu, Nov 15, 2012 at 11:52 AM, Matt McCormick <matt.mccormick at kitware.com
> wrote:

> Hi Cagatay,
>
> It usually works better to compute ix, iy, iz, ixx, iyy, izz all in
> one thread, and partition the data for each thread by ImageRegion.
>
> HTH,
> Matt
>
> On Thu, Nov 15, 2012 at 7:43 PM, Cagatay Bilgin <bilgincc at gmail.com>
> wrote:
> > Lets say I am writing a filter that needs ix, iy, iz, ixx, iyy, izz to
> > compute some measure. Once I have the output of derivatives, I know how
> to
> > make my filter threaded. What I don't know is how to make use of threads
> to
> > compute the derivatives in parallel, 1 thread computing ix, another one
> > computing iy, another one ixx so and so forth. What would be the best ITK
> > approach to do this? The derivative filters might already be threaded, I
> am
> > using them just to illustrate the problem.
> >
> > I guess I can also set the requested region of the derivative filters in
> > ThreadedGenerateData and then use the output of that to move on. Would
> that
> > be the way to go?
> >
> > Cheers,
> > Cagatay
> >
> > --
> > Cemal Cagatay Bilgin
> > Life Sciences Division
> > Lawrence Berkeley National Lab
> > MS977, One Cyclotron Road
> > Berkeley, CA 94720, USA
> > Email: ccbilgin at lbl.gov
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>



-- 
Cemal Cagatay Bilgin
Life Sciences Division
Lawrence Berkeley National Lab
MS977, One Cyclotron Road
Berkeley, CA 94720, USA
Email: ccbilgin at lbl.gov <hchang at lbl.gov>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121115/eaaf2d68/attachment.htm>


More information about the Insight-users mailing list