[Insight-developers] InterpolateImageFunction and Threads

kent williams norman-k-williams at uiowa.edu
Fri Mar 13 15:16:56 EDT 2009


I kinda figured that out after I posted that note.  Actually I am adding a
second interpolator, for the deformation field, so that the resolution of
the output doesn¹t have to match the resolution of the deformation field.


On 3/13/09 2:04 PM, "Karthik Krishnan" <karthik.krishnan at kitware.com> wrote:

> 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
> 
> 
> 




Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090313/dc349fce/attachment.htm>


More information about the Insight-developers mailing list