[wiki:SPM top]

Painting SPM data onto surfaces

1. Convert the brain.mgz volume to analyze:

mri_convert $SUBJECTS_DIR/subjectname/mri/brain.mgz brain.img

2. Align brain.img with your functional data in spm (eg, func.img)

3. Create your spm statistical output (eg, t.img)

4. Create the registration file:

tkregister2 --s subjectname --mov func.img \
    --regheader --reg  register.dat --surf orig

This will bring up the tkregister window with the orig volume. Hit the "Compare" button to see the functional. The green line will be the surface. Make sure the alignment is good (ie, the green line follows the bright intensity patterns in the functional). Hit the "Save" button to save the registration. This will create a file called register.dat.

5. View your functional data in the volume:

tkmedit subjectname orig.mgz -overlay t.img -overlay-reg register.dat

6. View your functional data on the surface:

tksurfer subjectname lh inflated -overlay t.img -overlay-reg register.dat

Notes:

1. This might not work very well if you've used the non-linear registration.

2. See also: [wiki:SPM SPM topics]