[Insight-users] Re: ResampleImageFilter

Karthik Krishnan karthik.krishnan at kitware.com
Thu Mar 22 11:19:20 EST 2007


On 3/22/07, Ranjan, Sohan (GE, Research) <sohan.ranjan at ge.com> wrote:
>
>  Sorry folks. I typed in some terms things wrong. Here is the actually
> what I want to say:
>
> As I understand, the ResampleImageFilter makes call to the TransformPoint
> method at every point. Is it really needed? Essentially, one needs to make
> call
> only once with input vector elements being the spacings. The result would
> give
> deformation at every point.
>

This is true for a very specific set of transforms, such as the
TranslationTransform, IdentityTransform, isn't it ? It isn't true for
affine, rotation, kernel transforms etc..

Based on this, even the interpolation may be speeded
> up because, say for example in linear interpolation, the co-efficients
> need to be
> computed only once.
>

This is true only for the Linear and NN interpolators, with the additional
constraint that you're using them with the aforementioned set of transforms.

Unfortunately "itk::Transform::TransformPoint" cannot be inlined, since its
a virtual function. So the speedup you're looking for is probably a
dynamic_cast to check for the right combination of transform/interpolator in
the ResampleFilter and dump the code in there...

There will always be a clash between generic programming allowing you to
plug your own transform/interpolator and a specialized optimized versions :)

--
karthik

Am I right? If so, Is it already implmented and I am out of
> luck?
>
>
> Sohan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070322/9067fe99/attachment-0001.htm


More information about the Insight-users mailing list