FreeSurfer is a software framework for the analysis of structural and functional MR imaging data. It is developed by the Laboratory for Computational Neuroimaging (Harvard University). FreeSurfer offers a variety of MRI processing and analysis tasks, such as reconstruction of cortical surface models, anatomical segmentation of the T1 data using cortical gray matter atlases, thalamic, hippocampal segmentation and statistical analysis of the morphometry. Our lab primarily uses FreeSurfer for the T1 weighted MRI data processing and analysis.
FreeSurfer requires Unix-based environment, therefore it can work on Linux or MacOS working stations. If you use Windows 10 as your main OS, you need to set up the Linux subsystem on Windows first.
FreeSurfer is free software, however the license should be obtained in order to make the framework fully operational.
Detailed tutorials can be found here. For the longitudinal complete MR segmentation we are using contrast-free T1 Weighted 3D MR imaging.
Main reconstruction command - recon-all takes T1 MR data (in nifti format) and performs all steps, or part of FreeSurfer grey matter reconstruction and segmentation procress.
An example of base terminal command:
recon-all -all -subject subjectname -i /path/to/input_volume
where -all flag, performing all steps of reconstruction; -subject name of subject directory created in $SUBJECTS_DIR folder; -i path to input MRI volume.
The entire reconstruction process typically takes 8-24 hours per one subject.
Freesurfer 7.0 provides a tool which can perform a segmentation of thalamus into 25 thalamic nuclei using probabilistic atlas. Thalamic nuclei segmentation command required that the T1 MRI data has been analyzed with the main FreeSurfer stream, make sure to run recon-all as a first step.
To run segmentation, type:
Procrss will take 15 to 30 min.
The output will consist of the following three files, which can be found under the subject’s mri directory:
ThalamicNuclei.v12.T1.volumes.txt: this text file stores the estimated volumes of the thalamic nuclei.
ThalamicNuclei.v12.T1.mgz: stores the discrete segmentation volumes at subvoxel resolution (0.5 mm).
ThalamicNuclei.v12.T1.FSvoxelSpace.mgz: stores the discrete segmentation volume in the FreeSurfer voxel space (normally 1mm isotropic, unless higher resolution data was used in recon-all with the flag -cm).
To extract the volumetric data from thalamus, type:
asegstats2table --statsfile=thalamic-nuclei.lh.v12.T1.stats --tablefile=path/to/output/directory/tablefile.txt --subjects subjectname1 subjectname2
Above command will generate thalamic nuclei volume metrics from the left thalamus. To extract measurements from the right thalamus, pick the thalamic-nuclei.rh.v12.T1.stats file.
Hippocampal subfields and thalamic segmentation require the matlab runtime package (MCR). The MCR allows users to run distributed matlab-compiled programs without paying for a matlab license
To install MCR for Freesurfer 7, type