This shows you the differences between two versions of the page.
biac:freesurfergolgi [2014/08/04 16:03] |
biac:freesurfergolgi [2023/02/23 18:43] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Freesurfer Guide ====== | ||
+ | |||
+ | |||
+ | ===== How to run Freesurfer on Golgi ===== | ||
+ | The tutorial below will refer to running Freesurfer to create the segmentation images, the inflated images, the parcellation images, and all of the other supplemental files it creates. | ||
+ | |||
+ | ==== Create your data directories ==== | ||
+ | Under your data folder (/ | ||
+ | < | ||
+ | Directory Tree: | ||
+ | / | ||
+ | - freesurfer | ||
+ | -- subjects | ||
+ | -- sessions | ||
+ | </ | ||
+ | |||
+ | ==== Set up your environment ==== | ||
+ | * The scripts to run Freesurfer use the tcsh/csh shells. | ||
+ | * Change to tcsh shell by typing " | ||
+ | * You'll need to add the following lines to your .tcshrc file in your home directory (create this file if it doesn' | ||
+ | < | ||
+ | set FUNCTIONALS_DIR = / | ||
+ | source / | ||
+ | </ | ||
+ | |||
+ | ==== Upload/copy your data to the freesurfer directory ==== | ||
+ | * The Freesurfer analysis only runs on T1 weighted data. | ||
+ | * The data must be in DICOM format to run properly (all anatomical data from the transfer daemon is in DICOM format). | ||
+ | * Make a directory under / | ||
+ | * Upload or copy a T1-weighted series directory into this subject' | ||
+ | < | ||
+ | Directory Tree: | ||
+ | / | ||
+ | - freesurfer | ||
+ | -- SubjectNumber1 | ||
+ | --- series500 | ||
+ | ---- All .dcm files of T1-weighted data here | ||
+ | -- subjects | ||
+ | -- sessions | ||
+ | </ | ||
+ | |||
+ | ==== Run Freesurfer ==== | ||
+ | * The program " | ||
+ | * " | ||
+ | * " | ||
+ | < | ||
+ | * Change to the tcsh or csh shell (type " | ||
+ | * Call " | ||
+ | < | ||
+ | Example from the directory tree above: | ||
+ | > runfreesurfer Subject1 series500 | ||
+ | </ | ||
+ | * You may see some warning messages appear, which you can ignore if the process keeps running. If it gets past the first hour without stopping it will probably run through okay. | ||
+ | * The full operation could take as much as 3 days to complete. | ||
+ | * There should be a file called " | ||
+ | < | ||
+ | > grep finished recon.log | ||
+ | </ | ||
+ | |||
+ | ==== Visualization of FreeSurfer results ==== | ||
+ | * To see the results you can use FreeSurfer' | ||
+ | [[biac: | ||
+ | |||
+ | ==== How do I get the data back into the original space? ==== | ||
+ | The volume output (aseg.mgz, aparc+aseg.mgz, | ||
+ | < | ||
+ | mri_convert -rl rawavg.mgz -rt nearest aseg.mgz aseg2raw.nii.gz | ||
+ | </ | ||
+ | where the -rl flag means " | ||
+ | |||