[Insight-users] Image interpolation problem

Luis Ibanez luis.ibanez at kitware.com
Wed Sep 8 19:25:01 EDT 2004


Hi Marcus,

Thanks for describing the details of your image.

This seems to be much simpler that the generic
unstructured grid case.



Here is what you could attempt:

1) Create an ITK transform using the 4th polynomial
    model that will map point coordinates from the
    image space into the undistorted physical space.

    For hints on how to create transforms you may
    want to look at the TranslationTransform.
http://www.itk.org/Insight/Doxygen/html/classitk_1_1TranslationTransform.html
    That is one of the simplest transforms in ITK

    For your particular case you can ignore all the
    transform functions for Vectors and Covariant
    Vectors, as well as they back transforms. That
    will let you focus only on the "Transform( point )"
    method.


2) Once you implement this transform, you can use
    the basic resampling filter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ResampleImageFilter.html
    and connect your new transform as the one to be
    used for recomputing the image.


3) You will find a detailed description of the resampling
    process in the ITK Software Guide

          http://www.itk.org/ItkSoftwareGuide.pdf

    Section 6.7.1, pdf-page 199 to 218.


4) We will encourage you to contribute that new transform
    to ITK, since it will probably be useful to other users
    dealing with MRI data.




   Regards,



      Luis




----------------------
Marcus Alley wrote:

> Hi Luis,
> 
> Thanks for writing back!  I've seen your notes on the mailing lists
> archives, and it was from one of your posts that I got the idea to use
> the kernel transforms.
> 
>     li> By "non-uniformly" spaced 3D image do you mean an
>     li> "unstructured grid" ?
> 
> As a background, I'm working with MR data.  The issue is that the
> gradients that do the encoding are not perfectly linear, and as a
> result after the Fourier-transform the resulting data points do not
> lie on a regularly spaced grid.
> 
> It's easy to calculate the displacements from where you wanted the
> data to be (i.e., the regularly spaced grid determined by the FOV and
> pixel spacing, etc.) to where the data actually are.  This is done
> with a fairly simple 4th order polynomial model.  So what I have is a
> 3D volume in which the point coordinates deviate from a regularly
> spaced grid by small displacements that are expressed in terms of
> polynomials.  From this data set I would like to generate 2D images at
> different orientations.  These interpolated 2D images would also have
> coordinates that deviate from a regularly spaced grid through this
> same polynomial model.
> 
> Does this help?  If I can tell you anything further please let me
> know.  I very much appreciate your help.
> 
> Marc
> 
>     li> Depending on how your image data has been sample you may find
>     li> more efficient ways of doing this interpolation with other ITK
>     li> classes.
> 
>     li> The Kernel splines, as you already noticed, are not a good
>     li> solution for large number of sampling points. They will result
>     li> in long computation times and large memory consumption.
> 
>     li> Please describe in detail the type of sampling grid that you
>     li> used for your "non-uniform" image.
> 
> 
>     li>    Thanks
> 
> 
>     li>       Luis
> 
> 






More information about the Insight-users mailing list