Running FreeSurfer in batch mode
Here is a quick way to run FS for each MRI image as a Nifti file in a folder.
Start by creating a new text file in the terminal (eg vi run.sh).
Put in the following code:
1 2 3 4 5 |
for file in * do recon-all -i $file -subjid $(cut -d '.' -f 1 <<< $file) recon-all -all -subjid $(cut -d '.' -f 1 <<< $file) done |
Save it an run it from inside the folder containing the images.
No comments yet