Anderson Winkler, Jason Stein, Roberto Toro
Last update: 29.Jun.2010.
For FreeSurfer users
FreeSurfer already produces measurements of intracranial volume (eTIV) and of brain volume, so there is no need for additional image processing steps, just extract the results. The numbers we are interested in are in the file aseg.stats, located in the subdirectory stats of each of the subjects’ directory. These numbers can be extracted from any aseg.stats file using:
|
There are many ways to create a table with all the results. A suggestion is to use a for-loop, looking at one subject per iteration. First, create text file called list_subjects.txt containing one subject ID per line:
|
Assuming that there is already a working installation of FreeSurfer and that the path for the directory that contain the analysis is in the environment variable ${SUBJECTS_DIR}, then copy and paste these lines at the prompt assuming you are using the bash shell (if you are not using the bash shell you can paste the commands into a script and add #!/bin/bash
to the top):
|
The outputs will be saved in the current directory, in a file named global_size_FS.csv. This file can be opened in spreadsheet applications such as OpenOffice Calc or MS Excel.
For people who are not using FreeSurfer, but still would like to report the same IntraCranialVol, the much shorter -autorecon1 part of FreeSurfer’s recon-all can be used. In this case, there will not be an aseg.stats file, but instead, we obtain an equivalent number from the file talairach.xfm. The task of producing a table with only IntraCranialVolume can be accomplished using the command xfm2det (available here), then copy and paste these lines at the prompt assuming you are using the bash shell (if you are not using the bash shell you can paste the commands into a script and add
#!/bin/bash
to the top):
|
For FSL users
Using FSL to obtain estimates for total intracranial volume and brain volume requires some image processing steps. An estimate for the total intracranial volume can be obtained by linearly aligning each subject brain to the MNI152 space, computing the inverse of the determinant of the affine matrix and multiplying by a constant, which is the size of the template. In our case, we don’t need the constant, so just the inverse of the determinant is sufficient. For the brain volume, the sum of the gray matter and white matter partitions produced by FAST is the estimate we are interested in.
To produce these numbers, assuming that there is already a working installation of FSL, which location is defined by the environment variable ${FSLDIR}, define the following variable at the prompt assuming you are using the bash shell (if you are not using the bash shell you can paste the commands into a script and add #!/bin/bash
to the top), which specify the template to be used:
|
Define a variable to the location where subjects’ files are. If the data is stored in /enigma/hippo/data, define this variable by typing at the prompt:
|
To define which subjects are going to be analysed and have results reported, create a text file called list_subjects.txt containing one subject ID per line:
|
If the images have not yet been skull stripped, it must be done now. Different combinations of BET options may work better depending on the images. The following is left as a suggestion that extracts the brain in two-steps, using FAST for an intemediate bias correction:
done |
Once the images have been all skull-stripped, are named such as ${subj_id}_brain.nii.gz, and their quality have thoroughly been checked, then run the following loop to align to a standard brain and segment into gray and white matter:
|
After the commands above have all been sucessfully finished and the quality of the outputs have been checked, then run the next loop to create a table with the results we are interested in. This loop requires the command mat2det (available here). If some of the subjects failed in the previous step, and it is not possible to recover, then it might be time to remove them from the list_subjects.txt file.
Obs: We have observed different levels of performance for the measurements of brain size with different datasets. We are aware that for some datasets, there may be settings that may work better. Different choices for the protocols and rationale their use may be discussed in our mailing list (see below).
|
The outputs will be saved in the current directory, in a file named global_size_FSL.csv. This file can be opened in spreadsheet applications such as OpenOffice Calc or MS Excel.
Where to find help
General information about the ENIGMA and this protocol can be found in the consortium website:
Questions about image processing related to this project can be directed to our mailing list. Subscribe to be informed and receive the latest updates by clicking the Join button above:
And send emails to: enigma@lists.ini.usc.edu
General documentation and support for FreeSurfer and FSL can be found in their respective websites and mailing lists:
ENIGMA on social media: