You would need to determine a rigid-body transform matrix with which the
data are to be transformed. You would need to do this part outside SPM.
Then once you have determined this matrix, you would pre-multiply the
voxel-to-world matrix in the NIfTI headers with the matrix. You can
read and write the voxel-to-world matrices via the spm_get_space
function of SPM.
Get/set the voxel-to-world mapping of an image
FORMAT M = spm_get_space(P)
spm_get_space(P,M)
M - voxel-to-world mapping
P - image filename
Best regards,
-John
I'm interested in reorienting a volume based on a plane. The
plane would be derived from 3 points within the volume. How
would I go about doing this in SPM8?
-Greg
--
John Ashburner <[log in to unmask]>
|