[Insight-users] Image deformation filter question

Phillip Cheng pmcheng at u . washington . edu
Fri, 11 Jul 2003 16:41:00 -0700


Hello,

I would like to perform the following simple image deformation using 
ITK.

1.  Generate a 3D mesh containing a vector displacement in mm for each 
grid point.
2.  Apply the displacements to an image whose resolution is finer than 
the mesh, using B-splines for interpolation.

I'm having difficulty connecting these steps efficiently in ITK.  In 
particular, it seems I need to use  itkBSplineDecompositionFilter to 
generate spline coefficients for each vector dimension in the mesh, and 
then copy all these coefficients to a 3x3D concatenated array for use 
in itkBSplineDeformableTransform (probably inverting things somewhere 
so that I have an output->input mapping).  But the copying step wastes 
time and memory, especially if the mesh is large and I need to generate 
many such transforms.  Is there a way to connect these pieces without 
copying the 3x3D arrays?

I looked at itkBSplineDeformableTransformTest.cxx which wraps the 
parameter array into several itkImages, and that seems close to what I 
need, but I'm a little unclear as to how to direct the output of 
itkBSplineDecompositionFilter into the parameter images for the 
deformable transform.

Thanks,

Phillip Cheng