Surface registration: recon-surfreg.sh¶
recon-surfreg.sh adds the spherical registration (?h.sphere and ?h.sphere.reg) to a subject that was
processed with --no_surfreg. The registration to FreeSurfer’s fsaverage is needed for any cross-subject
analysis of thickness maps, so this lets you add it later without running the surface reconstruction again. It needs
a FreeSurfer license, like the surface reconstruction.
Usage:
<fastsurfer_home>/recon_surf/recon-surfreg.sh --sd <subjects_dir> \
--sid <subject_id> --fs_license <freesurfer_license_path>
Full commandline interface of recon-surfreg.sh¶
./recon_surf/recon-surfreg.sh --help
Usage: recon-surfreg.sh --sid <subject_id> --sd <subjects_dir> [OPTIONS]
recon-surfreg.sh creates the ?h.sphere and ?h.sphere.reg from an existing
subject directory, if this step was skipped in recon-surf.sh with --no_surfreg
FLAGS:
--sid <subject_id> Subject ID to create directory inside $SUBJECTS_DIR
--sd <subjects_dir> Output directory $SUBJECTS_DIR (or pass via env var)
--threads <int> Total thread budget, "auto" or "max". With 2 or more
the two hemispheres run at the same time and split
it, so 2 gives one thread each and 8 gives four
each. Use 1 to keep every binary single threaded.
Without the flag, OMP_NUM_THREADS sets the budget
if exported, else auto: the allocation of a cgroup
quota or a scheduler job, or else the physical
cores less one (on Apple silicon all performance
cores), at least 2 and at most 8. "max" uses all
available CPUs.
--parallel Run the hemispheres at the same time with one thread
each, even at --threads 1. That keeps every binary
single threaded, and so reproducible, while still
using two cores. No effect at --threads 2 or more,
where the hemispheres already run at the same time.
--py <python_cmd> Command for python, default python3 -s
--fs_license <freesurfer_license_path>
Path to FreeSurfer license key file. Register at
https://surfer.nmr.mgh.harvard.edu/registration.html
for free to obtain it if you do not have FreeSurfer
installed already
-h --help Print Help
Dev Flags:
--ignore_fs_version Switch on to avoid check for FreeSurfer version.
Program will otherwise terminate if 8.2.0 is
not sourced. Can be used for testing dev versions.
REFERENCES:
If you use this for research publications, please cite:
Henschel L, Conjeti S, Estrada S, Diers K, Fischl B, Reuter M, FastSurfer - A
fast and accurate deep learning based neuroimaging pipeline, NeuroImage 219
(2020), 117012. https://doi.org/10.1016/j.neuroimage.2020.117012
Henschel L*, Kuegler D*, Reuter M. (*co-first). FastSurferVINN: Building
Resolution-Independence into Deep Learning Segmentation Methods - A Solution
for HighRes Brain MRI. NeuroImage 251 (2022), 118933.
https://doi.org/10.1016/j.neuroimage.2022.118933