top | previous

Automatic registration using spmregister and verifying results with tkregister2

Two volumes may be automatically registered using the spmregister command. Spmregister uses functionality from Matlab, so make sure Matlab is installed and in a location reflected in your $PATH.

1.0 Using spmregister

Again, it is important to first be certain that the functional volume and the FreeSurfer structural volume represent the same subject, and that the functional volume exists in the correct orientation before attempting automatic registration. After confirming these, run the following command from the directory containing the functional volume, or explicitly include the functional volume's pathname:

cd $TUTORIAL_DATA/buckner_data/tutorial_subjs
setenv SUBJECTS_DIR ${PWD}
spmregister --s bert-brf --mov f001.img --reg register.dat

Instead of specifying a dummy file in which to save the final registration matrix, in this example we specify the filename register.dat by convention. Spmregister will produce verbose output in your xterm, and a review of this should indicate whether the registration completed successfully. Upon successful completion, spmregister will write the file register.dat in the directory from which it was run. This ascii file may be viewed by typing in the xterm window:

cat register.dat

2.0 Visualizing the result using tkregister2

To visually check the results of this registration, use the tkregister2 command:

tkregister2 --s bert-brf --mov f001.img --surf orig --reg register.dat

making sure to use the same register.dat file that spmregister2 produced.

3.0 Verifying subject and orientation

After registering two volumes, an important step is to verify that these datasets do in fact belong to the same subject (such mistakes are common enough to warrant mention!). Second, it is also important to verify that the functional volume is not Right/Left flipped relative to the anatomical scan, since automatic registration routines will likely not correct for this orientation error.

The different datasets can be visually compared using the compare button in the bottom center of tkregister2's GUI; this button toggles between a view of the white matter surface overlayed onto the structural volume, and a view of the surface overlayed onto the functional volume. In either view, the surface overlay may be toggled on and off by selecting the image window to render it active and then using the s key.

A good way to determine whether the functional brain image is correctly oriented is to use the assymmetry of a subject's data; step through the volumes' slices in the view (coronal, axial, or sagittal) that corresponds to the data's capture and find cortical folds that can be used as visually distinct features. Check that these features appear to correspond on both the structural and functional scans as in the example below.

verify-without-w.jpg verify-with-w.jpg

FsTutorial/AutomaticRegistrationSpm (last edited 2011-03-30 16:23:28 by NickSchmansky)