I store deformation fields, rather than displacement fields in the
y_*.nii/img files. These encode mappings from voxels to some mm space
in another subject.
Maybe take a look at spm_defs.m, in the subfunction get_sn2def (around
line 70 onwards). The code generates displacement fields, which are
added to an identity transform and then transformed by an affine
transform. The code should show you how the displacements are generated
from the basis function coefficients saved in the seg_sn.mat file.
Best regards,
-John
On Mon, 2009-10-19 at 15:49 +0100, Joao Pereira wrote:
> Hello,
>
> I'm trying to visualize the deformation fields produced by the unified
> segmentation in SPM5 in terms of 3D vector fields, but I have been
> unsuccessful so far.
>
> With the deformation toolbox, I have extracted the deformation field
> from *sef_sn.mat (together with the identity based on the original
> scan to have the field in native space). I have also broken the final
> y* file into 3 separate files. The resulting vector fields are
> calculated by subtracting the deformation mapping to a grid created
> with ndgrid, but the results seem very improbable, namely because pose
> seems to be present.
>
> Is there a more effective form of extracting these vector fields? In
> particular, is there a known way of removing pose/affine information
> from the initial y* fields?
>
> Thank you!
>
> Joao
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
--
John Ashburner <[log in to unmask]>
|