Print

Print


Dear Xuemei,

> I have been confused with the nonlinear transformation.
> 
> (1) Assume that (x,y,z) is in the original image in ”mm coordinates”.
> (x’,y’,z’,1).T = A*(x,y,z,1).T
> Where A is the 4*4 affine matrix, and .T denotes the transpose.
> So far, (x’,y’,z’) is at the reference image space but only affine transformed, and it corresponds to the index (i’,j’,k’) in “voxel coordinates”.

You have that one back to front. The way fnirt (and flirt) works x,y,z is in the reference image and x',y'z' is in the image you want to transform.

> 
> (2) Then we need to update them with the displacements field.
> (x'’,y'’,z'’,1).T = (x’,y’,z’,1).T + (dx(i’,j’,k’),dy(i’,j’,k’),dz(i’,j’,k’),0).T
> where d is the displacements field (without affine component) read from the output nii of ‘fnirtfileutils’.

It is not dx(x',y',z'), it is dx(x,y,z).

> 
> (3) Then the (x’’,y’’,z’’) is the final location in the non-linear transformed image corresponding to the original location (x,y,z), that is, the values in the two locations are the same.

I am not sure I understand what you mean here. Maybe my two replies above have clarified this point?

Good Luck Jesper