[Insight-users] Resampling the moving image?

motes motes mort.motes at gmail.com
Thu Nov 12 18:16:15 EST 2009


On Sun, Nov 8, 2009 at 7:47 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> Hi Motes,
>
> If you have a Fixed image "F" and a Moving image "M",
> and the output of your registration process is the transform
> "T",
>
> Then applying "T" to the *points* of the image F will give you
> the coordinates of the corresponding points in the image M.
>
> Following your example,
> if the transform turns out to be a translation:
>
>                                      T = (1,5)
>
> That means that if we take a point P from the Fixed image
> space, and P has coordinates P=(x,y), then we can find the
> coordinates of its corresponding point Q in the Moving image
> by the following operation:
>
>                        Q = T(P) = ( x+1, y+5 )
>
> The expression T(F) could be interpreted as "mapping all
> the points from the fixed image".
>
> T is indeed the transform that is used for resampling the
> Moving image M into the coordinates of the Fixed image F.
>
>
> The way resampling works, is by:
>
>    A)  visiting all the pixels of the Fixed image,
>    A.1) for each pixel, compute its physical coordinates
>           in the space of the Fixed image
>    A.2) Use the transform T to compute the corresponding
>            point Q = T(P) in the moving image space
>    A.3) convert Q from the physical coordinates of the moving
>            image into the grid coordinates of the moving image
>    A.4)  Apply an interpolator as needed.
>

Ok but that is the exact same thing that goes on in the registration
method in the metric so I don't see any difference between how the
transform is applied in the registration method and how its used in
the resampler.

Is it because the moving image is in fact passed to the resampler as
input and is now treated as the fixed image?

I have tried to compute a know transformation of the fixed image using
the BSplineWarping1.cxx where I specify the fixed image as input for
both the fixed image and the moving image. The result is a deformed
version of the fixed image which I use as the moving image in the
registration process.

When the registration process is complete I take the final transform
parameters and apply those to the original fixed image. Basically I
just  run the BSplineWarping1.cxx example again but with the paramters
produced in the registration method. Below is the result:

http://37133.vs.webtropia.com/apache2-default/test/grid.jpg

Now this looks wierd. When I apply the transform from the registration
process to the fixed image I get something that looks like the
"inverted" version of the moving image.

Should the result not look like the deformed image?


More information about the Insight-users mailing list