[Insight-users] Re: ResampleImageFilter

wlorens1 at nycap.rr.com wlorens1 at nycap.rr.com
Thu Mar 22 12:31:37 EST 2007


There is a fast path for linear tranformations, implemented in 
LinearThreadedGenerateData

Bill

----- Original Message -----
From: Karthik Krishnan <karthik.krishnan at kitware.com>
Date: Thursday, March 22, 2007 9:55 am
Subject: [Insight-users] Re: ResampleImageFilter
To: "Ranjan, Sohan (GE, Research)" <sohan.ranjan at ge.com>
Cc: insight-users at itk.org, luis.ibanez at kitware.com

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


More information about the Insight-users mailing list