[Insight-users] Re: About image warping : Inverting deformation fields

Luis Ibanez luis.ibanez at kitware.com
Mon, 02 Feb 2004 16:02:29 -0500


Hi Harald,


There are two new developments in ITK on the front
of inverting deformation fields associated with
deformable registration.


A) A first version of the
    DeformationFieldInverseImageFilter

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

    has been commited.  Note that this filter
    computes just an approximation to the
    inverse of the input deformation field.
    The accuracy of the approximation can be
    increased at the price of larger memory
    consumption and longer computation time.

    This filter could be used as an initializer
    for the refinement method that you suggested.



B) In InsightApplications, a new application
    as been added by the group at the University
    of Iowa which implements the method described in

    "Consistent Landmark	and Intensity-Based Image Registration"
    IEEE, TMI Vol 212, No.5, pp 450-461.
    by Johnson and Christensen.

    You will find this under

      InsightApplications/
           InverseConsistentLandmarkRegistration

    This algorithm estimates both the forward and reverse
    transformation.



Please let us know if you find any issues with
this new code.


   Thanks


     Luis



----------------------
Harald Grossauer wrote:

> Thank you for your efforts.
> 
> I think it could also be done by considering the forward calculation only, and 
> getting a dense destination image by solving a "scattered data interpolation 
> problem". This is probably equivalent to the approach you suggest, but I 
> think there is no need to calculate the inverse deformation field. At least, 
> there is a lot of literature about scattered data interpolation.
> 
> Further, instead of calculating the inverse of a transform T it might be 
> better to search for a transform S which fulfils
> 
> sum_{x in D} | S(T(x)) - x | --> min
> 
> I think the problem is that in order to get good results the interpolation 
> (bilinear, bicubic, ...) has to be considered explicitly in the inversion 
> process.
> 
> Finally, the scattered data interpolation should be more robust if the 
> transform is not one-to-one, or not "continous", or locally changes 
> orientation,i.e., if the sign of the jacobi determinant changes locally.
> 
> But these are just some thoughts that came into my mind, without trying it 
> out, or thinking more deeply about them.
> 
> Regards,
> Harald
> 
> 
> Am Dienstag, 13. Januar 2004 03:54 schrieben Sie:
> 
>>Hi Harald,
>>
>>Your question is quite interesting.
>>
>>I agree with you in that a better option is needed.
>>So I decided to write a filter for computing an
>>estimation of the inverse deformation  field.
>>
>>
>>The basic idea is to subsample the forward deformation
>>fields, and generate a grid of the mapping in the target
>>space, then use the kernel-base splines for resampling a
>>fine grid in the target space using the reverse deformations.
>>
>>It will still take me a couple of days to get it
>>running and to test it. I'll get back to you when
>>it is in a more presentable form.
>>
>>
>>   Regards,
>>
>>
>>      Luis
>>
>>
>>----------------
>>
>>Harald Grossauer wrote:
>>
>>>Hi,
>>>
>>>using Google I found your "article"
>>>http://www.itk.org/pipermail/insight-users/2003-February/002646.html
>>>where you gave some hints about image warping. Now I have almost the same
>>>problem that you gave an answer for. Most interesting for me are the
>>>following lines:
>>>
>>>2) visiting each pixel of the output grid
>>>3) for each pixel do:
>>>3.1)  get its spatial coordinates given the
>>>       output grid origin and spacing
>>>3.2)  Using the deformation field, map the
>>>       spatial coordinates into the input
>>>       image space. (Here is what may seem
>>>       counter intuitive).
>>>3.3)  with the coordinates in the input image
>>>       find the associated grid point of the
>>>       input image and get its intensity value.
>>>       (the input image, origin and spacing
>>>        are considered at this stage).
>>>3.4)  if the point mapped in a non-grid position
>>>       use an interpolator in order to compute
>>>       the intensity from neighbor pixels.
>>>
>>>Now I was aware that I had to iterate over the output image and use the
>>>inverse transform (and it does not seem counter intuitive to me, it seems
>>>very logical). But how exactly do you find the inverse transform? My
>>>problem is that my transform maps integer coordinates from the input
>>>image to real valued coordinates in the output image. Further, I guess I
>>>will have to do some kind of interpolation to get good results, which
>>>makes the problem even harder. Changing the sign of all displacement
>>>vectors (as you also wrote in that article) does not seem a good idea to
>>>me.
>>>
>>>I hope I don't bother you,
>>>regards,
>>>Harald
> 
> 
>