Finds the Freesurfer from system environment or getOption("freesurfer.path")
for location of Freesurfer functions
get_fs(bin_app = c("bin", "mni/bin", ""))| bin_app | Should |
|---|
NULL if Freesurfer in path, or bash code for setting up Freesurfer DIR
This will use Sys.getenv("FREESURFER_HOME") before getOption("freesurfer.path").
If the directory is not found for Freesurfer in Sys.getenv("FreesurferDIR") and
getOption("freesurfer.path"), it will try the default directory /usr/local/freesurfer.
if (have_fs()) {
get_fs()
}