[wiki:FsTutorial top] | [wiki:FsTutorial/MorphAndRecon previous]

Fixing Bad Output From the Talairach Registration

FreeSurfer uses some of the tools developed at the Montreal Neurological Institute (MNI) (http://www.bic.mni.mcgill.ca) to align anatomical volumes (using minctracc) and to compute the linear Talairach transform (using mritotal). The mritotal documentation says that it generally works well for T1 dominant images. The transform is contained in a 3x4 matrix in a file called talairach.xfm and is located in the <subject name>/mri/transforms directory.

The mritotal program uses correlation as a similarity measure, and can fail due to image artifacts that reduce the correlation of a good match. Some examples of these are caused by the volume having systematic gray scale variations, noisy white matter regions, or a bright neck region. The last resort would be the manual registration, because that means that the variability of the transform from one person to next becomes an issue.

The first step is to look at the result of mritotal (recon-all leaves a mritotal.log in <subject name>/scripts directory). At the end of this log, you will find a number that looks like this:

Final objective function value = 0.06068489

If the number is bigger than 0.1, the transform is suspect. If it is bigger than 0.2, it is likely wrong. Experience has shown that when this number is around 0.06, the transform is good.

In case of a bad transform, there are some [wiki:FsTutorial/TalairachAuto automatic ways to regenerate the transform]. If the transform still looks bad after trying the automatic methods, you can try a manual registration.

Go into the talairach_tutorial directory, set your SUBJECTS_DIR environment variable to the current directory, and open the 095_before brain volume with tkmedit:

cd $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs
setenv SUBJECTS_DIR ${PWD}
tkmedit 095_talairach_before brain.mgz &

In the tkmedit toolbar, go to:

File -> Transforms -> Load Transform for Main Volume...

Click browse, select the file talairach.xfm and click 'OK'.

As you can see in the coronal view, the transform has resulted in an extremely distorted brain.

Now, run tkregister2 to open an interface to adjust the registration:

tkregister2 --mgz --s 095_talairach_before --fstal --surf orig 

Brief descriptions on how to operate tkregister2 are given below. More documentation is also available by running "tkregister2 --help".

You will see the subject's volume as the TARGET volume and your Talairach volume as a fuzzy MOVEABLE volume. The green lines are the orig surface from the subject. This will be the same in both the TARGET and the MOVEABLE. It can be turned on and off by clicking in the image window and hitting the 's' key.. Find the fmov: box in the tkregister toolbar and make sure it is set to 1.0.

The goal is to stretch, translate, and rotate your MOVEABLE volume so that the two brains look as similar as possible, at least along the key anatomical points (anterior/posterior commissures, the temporal lobes in the coronal plane, and the midline cut).

Use Ctrl-1 and Ctrl-2 to switch between the two volumes (or hit the COMPARE button). You will want to do this frequently to check your progress. Click the SAGITTAL button to switch to a sagittal view, and go to slice 128 by using the slider directly below the SAGITTAL button. In this view you have a good view of the corpus callosum in both the moveable and target volumes.

attachment:tal0.jpg

To rotate the moveable volume, use the ROTATE BRAIN slider. You will want to move the slider only a couple of degrees at a time until you achieve the desired effect. You will notice a small red cross icon near the middle of the viewing window. This is the center of rotation. You can change the location of the center of rotation by left-clicking in the viewing window with your mouse.

attachment:tal1.jpg

For translation, there are two sliders: one to move the volume left and right, and one to move the volume up and down. Next, translate the moveable brain upwards by using the TRANSLATE BRAIN vertical slider. Again, you only want to move the volume a couple millimeters at a time. You can move the volume left and right in the same way.

attachment:tal2.jpg

Once you have the corpus callosum aligned as well as possible in the sagittal plane, click the HORIZONTAL button to get a horizontal view, and use the slider directly below the HORIZONTAL button to go to slice 128. Use Ctrl-1 and Ctrl-2 to switch between the two volumes. Use the ROTATE BRAIN and TRANSLATE BRAIN buttons as before to align the midlines of both volumes.

attachment:tal3.jpg

Once you are done aligning the brains in the horizontal view, switch back to slice 128 in the sagittal view. Fine tune your rotation and translation again until the corpus callosum is once again aligned in both volumes.

attachment:tal4.jpg

Click the CORONAL button, and go to slice 128. Align the midlines of the brains again in the same way.

attachment:tal5.jpg

Continue this way, switching frequently between the HORIZONTAL, SAGITTAL, and CORONAL views, and align the visible brain structures as much as possible in all of the slices. Use the SCALE BRAIN button as needed to scale the brain in the X and Y direction. Keep in mind that you are working in 3D, not in 2D, so any changes made in one view will affect the other views as well.

attachment:talcor.jpg attachment:talsag.jpg attachment:talhor.jpg

When you are satisfied with your registration result, click the SAVE REG button in the tkregister2 toolbar. You can close tkregister2 by clicking on the red close button in the upper left hand corner of the viewing window, or by typing Ctrl-C in in the same terminal window as the new matrix.

Note: do not run the Talairach stage of the FreeSurfer reconstruction or your manual edits will be overwritten. E.g., when running recon-all, use the -notalairach flag.