[Insight-users] Resampling non uniformly spaced data

Luis Ibanez luis . ibanez at kitware . com
Mon, 19 May 2003 10:33:15 -0400


Hi Georges,

You can use the Kernel based transform for this purpose.

Here is what you may want to do:

1) Choose one of the kernel base splines available

    - Elastic Body Spline
    - Elastic Body Reciprocal Spline
    - ThinPlateR2LogR
    - ThinPlateSpline
    - VolumeSpline

http://www.itk.org/Insight/Doxygen/html/classitk_1_1KernelTransform.html

2) Instantiate this tranform for 3D (your data is 2D
    and the scalar value is going to be used as the third
    coordinate in space). Think of your data as an elevation
    grid.

    You will create two sets of landmarks. (Source and Target).
    each landmark will be associated with one the points in
    your grid.

    The source landmarks will be such that their x,y coordinates
    will be the same of your 2D grid points, and their Z corrdinate
    will be Zero.

    The target landmarks will also use the 2D coordinates of your
    grid points as their x,y coordinates. Their Z coordinate will
    be equal to the scalar value associated with your grid point.


3) Once you have constructed both sets of landmarks, connect
    them into the transform and initialize the transform.


4) You are now ready to star your regular sampling.

    Generate uniform coordinates in the space of the source grid,
    and simply use the TransformPoint() method of the KernelTransform
    in order to get a 3D point in the target space. You will ignore the
    x,y coordinates of the output point, and simply take the Z coordinate
    as the intensity value to put in your 2D image.



It shouldn't be too hard to encapsulate the whole procedure in
the form that you suggest:

              PointSetToImageFilter.

It may actually be quite useful for object representation.


You may want to take a look at the demo application available at :


       InsightApplications/ThinPlateSplines:

       http://www.itk.org/HTML/ThinPlateSplines.htm


Note that this can be extrapolated to any dimension and to any
number of components. E.g. you could interpolate a 3D non-uniform
grid by using a 6D kernel transform which associates the first
three coordinates to space and the last three to R,G,B values.




Please let us know if you have further questions.


Regards,


    Luis



------------------------------
Georges Le Goualher wrote:
> Hi,
>  
> Does itk library contain methods for resampling non-uniformly spaced data?
>  
> Actually, I would like to use Itk to do the following task:
> given a set of non-uniformly spaced 2D data (data that could
> be represented in itk as a PointSet or a Mesh), I would like
> to generate a 2D image with isotropic pixels.
>  
> I think the basic super class to look for should be a MeshToImageFilter
> or a PointSetToImageFilter, but these classes are not implemented
> in itk.
>  
> Is there an alternative approched already implemented?
>  
> Many thanks for your help,
> Georges