[Insight-users] Re: ResampleImageFilter

Luis Ibanez luis.ibanez at kitware.com
Fri Mar 23 12:56:44 EST 2007


Hi Sohan,


   You are probably looking at a very old version of ITK.



Please look at the ITK 3.2 (or the CVS) version.

You will find in the file:


    Insight/Code/BasicFilters/itkResampleImageFilter.txx

in lines 186 -193 the following code:

   // Check whether we can use a fast path for resampling. Fast path
   // can be used if the transformation is linear. Transform respond
   // to the IsLinear() call.
   if( m_Transform->IsLinear() )
     {
     this->LinearThreadedGenerateData(outputRegionForThread, threadId);
     return;
     }


As you can see, when the transform is independent of the position
of the point, the resample filter takes a short cut that is based
on internally computing the location of the next transformed point
instead of having to invoke the transform itself.

The speed up method is implemented in lines 312-489 of the same file.



    Regards,



        Luis



===========================


Ranjan, Sohan (GE, Research) 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. 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. Am I right? If so, Is it already implmented and I am 
> out of
> luck?
>  
>  
> Sohan


More information about the Insight-users mailing list