[Insight-users] applying the transformation matrix

Romain Lebel romain.lebel at phaseview.fr
Wed Dec 14 06:20:58 EST 2005


Hi every one!

I'm using the itk affine transform to get my images registred.
The thing is that i need to use the matrix outputed by itk (for 
interfacing with another part of a software).

If i undderstood well the matrix outputed is the one that put the moving 
image in the physical space of the fixed image (no need to use the 
invers transform).

When i apply directly this matrix to the moving image i do not recover 
exactly the registred image ouputed by itk. What i do is take a point in 
the moving image. Compute it's coordinate in the fixed image using the 
matrix. And then get the gray level of the corresponding nearest 
neighboor in the moving image ( i tried linear interpolation and get 
same results so i don't think it is a problem of interpolation)

I tried with wery simple synthesis images (white pad on black 
background). If there is only a translation beetween the image  i manage 
to recover the right image. When there is only scaling i find the right 
scaled image but my center is at the wrong place (no on the center of 
mass outputed by itk)

my question is how to apply the transformation matrix to get the same 
image as the one outputed by itk using resample filter?

ps: sorry for this long mail but i tried to describe as pricisely as 
possible

-- 
Romain Lebel
PhaseView - Telecom Paris
37-39 rue Dareau, 75014 Paris
Tel : +33 (0)1 45 81 81 68     Fax: +33 (0)1 45 81 81 44
Internet :  www.phaseview.fr



More information about the Insight-users mailing list