[Insight-developers] InterpolateImageFunction and Threads
Karthik Krishnan
karthik.krishnan at kitware.com
Fri Mar 13 15:04:37 EDT 2009
On Fri, Mar 13, 2009 at 1:13 PM, kent williams
<norman-k-williams at uiowa.edu>wrote:
> Hi. I'm working on enhancing the WarpImageFilter to work with
> DeformationFields with resolution/spacing different than the output image
> size.
>
> To do this I am using itk::VectorLinearInterpolateImageFunction, to get a
> deformation field at a particular physical point, rather than simply using
> an ImageRegionIterator.
>
> My question is this: The most natural thing to do is to instantiate the
> interpolater right before where it's used, in ThreadedGenerateData. But
> this means it will get created/destroy for each thread.
>
> Can I create one interpolater in BeforeThreadedGenerateData, and use it in
> all threads? It looks like it's thread safe.
Isn't this already done in itkWarpImageFilter.txx now ? There is a single
interpolator that is created once in BeforeThreadedGenerateData.
Thanks
--
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090313/9f8217d1/attachment.htm>
More information about the Insight-developers
mailing list