1.


IMPORTANT NOTE: Freesurfer no longer uses the mritotal utility. It has been superceded by the talairach_avi script.


Freesurfer uses a tool called mritotal in the package called mni_autoreg http://www.bic.mni.mcgill.ca/users/louis/MNI_AUTOREG_home/readme/. It is a Perl script and Perl scripts do not work well with unicode (recently Linux user default is LANG being en_US.UTF-8). You should always set

$ setenv LANG en_US

or

$ setenv LANG C

before running mritotal.

It uses the MNI average_305 template volume to create the linear talairach affine transform. The transform file talairach.xfm is deposited in $subject/mri/transforms directory. The template volume average_305.mnc resides in $FREESURFER_HOME/lib/mni/share/mni_autoreg directory in the MGH environment.

Because the mritotal method uses the correlation method, the resulting transform can be bad due to many reasons -- the documentation for mritotal says that it works well for T1 dominant images. The last resort would be manual registration because you risk having variability of the transform from one person to the next.

The first step is to look at the result of mritotal (recon-all leaves a mritotal.log in $subjid/scripts directory). At the end of this log, you will find a number printed:

Final objective function value = 0.06068489

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

You can see how good the transform is by loading the orig volume and applying a transform in tkmedit. Then compare the volume with $subjects_dir/fsaverage/mri/mni305 volume (load it as aux volume). (Note that you cannot load average_305.mnc which has non 256^3 volume. tkmedit cannot handle two different sized volumes. The fsaverage/mri/mni305 is conformed to have 256^3 so that you can load it under tkmedit.)

There are at least two causes of failures. One cause is that the volume has systematic gray scale variations or noisy white matter regions. Another cause is a volume which has a bright neck region.

In the case of grey scale problem, a suggestion is to try "T1" (white matter set to have 110 only) and then "brain". Here are the steps you take:

$ mri_convert T1 T1.mnc

$ mritotal -protocol icbm T1.mnc T1.xfm

Check the transform, using tkmedit. If still bad, try

$ mri_convert brain brain.mnc

$ mritotal -protocol icbm brain.mnc brain.xfm

Check the transform, using tkmedit.

If you find a good transform during the step above, replace mri/transforms/talairach.xfm with the good one. You must use the same name talairach.xfm.

When you see a big bright neck region, an option is to edit the volume to erase the bright neck region and run mritotal on the edited volume. It usually works by a simple editing, setting all the region to zero where y > certain value (around 170). This worked better than using "brain" volume.

If it is still bad, you can try using a manual registration tool to create the transform. Note that you have to create the MNI compatible talairach.xfm to go along with further freesurfer processes.

There exist a few manual registration tools.

The MNI GUI tool called register http://www.bic.mni.mcgill.ca/software/register/register.html allows you to get the linear transform manually by specifying the corresponding points and produces the xfm compatible with the process. The catch is that you have to convert your volume into MINC format, using mri_convert as shown above.

When you use tkregister or tkregister2, you are advised to convert register.dat to the xfm, using regdat2xfm.

  1. This process uses the command mri_fill to create a binarized volume. The input is the mri/wm volume and the output is the mri/filled volume. First, the cutting planes are determined to separate the hemispheres from each other and the pons. Then a seed point is located and used to fill each hemisphere. The rh will be filled with a value of 255, and the lh with a value of 127.

    Occasionally, manual intervention is required to define the cutting planes and seed points. To do so, follow these steps:

    1. Open the subject's (subj) wm volume up in tkmedit.

    2. View the MniTalairach coordinates: View->Information->MNI Coordinates

    3. Select the Corpus Callosum point, on the mid-posterior portion of it. Example: Corpus Callosum

      CCcor.jpg CChor.jpg CCsag.jpg

    4. Copy the MNI coordinates to the command line for either

      recon-all -cc-xyz .... or in

      mri_fill -C ....

      Alternatively seed point can be given in voxel coordinates under the command line mri_fill :

      -CV <x> <y> <z> - the voxel coords of the seed for the corpus callosum

      -PV <x> <y> <z> - the voxel coords of the seed for the pons

    5. Do this for all of the other cutting plane points and seed points. Examples follow: Pons

      Pcor.jpg Phor.jpg Psag.jpg RH seed

      RHcor.jpg RHhor.jpg RHsag.jpg LH seed

      LHcor.jpg LHhor.jpg LHsag.jpg

    6. Not all points need to be defined, any range from none to all four may be defined. To inflate:



      mri_fill -C MNIcoords -P MNIcoords -rh MNIcoords -lh MNIcoords $SUBJECTS_DIR/subj/mri/wm $SUBJECTS_DIR/subj/mri/filled;inflate_subject-rh subj;inflate_subject-lh subj

      or, the equivalent in recon-all:



      recon-all -stage2 -cc-xyz MNIcoords -pons-xyz MNIcoords -rh-xyz MNIcoords -lh-xyz MNIcoords -subjid subj

      NOTE: These command line(s) need to be run EVERYTIME the subject's surfaces are reinflated

FreeSurferSegmentation (last edited 2021-09-22 11:37:03 by DevaniCordero)