[Insight-users] Small discrepancy after applying registration transform

Patrik Brynolfsson patrik.brynolfsson at radfys.umu.se
Fri Apr 1 05:01:24 EDT 2011


Hello,

I have a little problem that I think is just down to some small detail in my
understanding of DICOM and ITK. I want avoid resampling an image when
applying a rigid transform by applying the transform to the directional
cosines (C) and the position vector (V) of the image instead. I do this by
first getting the rotation matrix (M) and the offset (O) from the transform
(an Euler3DTransform) and setting the new directional cosines as the matrix
multiplication of the rotation matrix and the directional cosines,

C2=M*C,

and the new position vector as

V2 = M*V + O.

I noticed that in order to get correct results I must subtract the offset O,
so

V2 = M*V - O.

I check the result by resampling my new image using an identity transform
and my fixed image as reference and then take the difference between them.
The result is slightly worse than if I just resample my original moving
image with the resulting transform of the registration. I use bsplines  = 3
when resampling in both cases. It seems that my way of applying the
transform is off by a voxel or so.

What am I doing wrong? Since I wanted to add the offset instead of
subtracting it I guess I don't fully understand the parameters I'm working
with so I guess I'm making more mistakes. Can someone point them out to me?
Maybe there is already a filter that does what I want to do?

Thanks in advance!

Regards
===================================
|   Patrik Brynolfsson
|   Ph.D. student at Dept of Radiation Physics
|   Umeå University
|   SE-901 87 Umeå
 |   Sweden
|   Phone: +46 (0)90 785 2296
===================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110401/82eadf13/attachment.htm>


More information about the Insight-users mailing list