Print

Print


Hi all,
I would like to understand meaning of realignment parameters because I need
to handle some data coming from a follow up study.
Let say I have a patient, who came at time t_0; he has been scanned to get
a *T1old,* and some datapoints on his scalp have been mapped. Those points
are in voxel coordinate.
The same subject came again at time t_1, he has been scanned again and new
points *Pnew* have been obtained on the new scan, called *T1new*.
Now, I would like to overlap new datapoints onto the T1old got at time t_0
and compare them somehow with the old datapoints.
I have used *spm_realign *to get the rigid body transformation of T1new to
T1old (because the images do differ from one scan to the other)
Let be *V_rTnew.mat* the voxel2world matrix of the realigned *rT1new*, and
*V_Told.mat* the voxel2world matrix of *Told*; I can get the transformation
parameters by typing

*transfparams=spm_imatrix(V_rTnew.mat/V_Told.mat)*

Now, I can get the affine transformation matrix by using *spm_matrix*

*affineMAT=spm_matrix(transfparams(1:6)); %it is rigid body then only 6
parameters*

Eventually. I want to manually transform new datapoints, e.g., *Pnew*, in
order to be overlapped onto my *Told* , becamingo finalPnew.
What is the global transfotmation I have to apply?Would this procedure be
working?

1) *VoxPnew* -> *V_rTnew.mat*[VoxPnew;1]=[MMPnew;1]* (to get the same
coordinate in millimiters of Tnew space)
2) *MMPnew* -> *affineMAT*[MMPnew;1]=[MMtransfPnew;1]* (to transform the
coordinates in the same location where they should be in the Told world
space)
3) *MMtrasnfPnew* -> *inv(V_Told.mat)*[MMtrasnfPnew;1]=[finalP;1]*

I am not sure for two reasons:
a) I do not know whether my *affineMAT* really maps mm coords of T1new to
mm coords in Told wrold space
b) I do not know whether, in step 1), I should use *V_rTnew.mat *or
*V_Tnew.mat* , i.e., the voxel2world matrix of the realigned new volume or
the voxel2world matrix of the raw Tnew volume. I am in doubt here because I
have seen that, in the header info of nifti file Tnew, there are three
places where a voxel2world matrix is written: *V_Tnew.mat*,
*V_Tnew.private.mat* and *V_Tnew.private.mat0*, and only the second one
seems to change in rTnew volume.

Can somebody please help me understanding the whole procedure?
Thanks,

Alessandro