ENH: New `--standard` option
This MR adds a new --standard
command-line option, which allows users/scripts to select templates on the command line rather than via the $FSL_STANDARD
environment variable. The $FSL_STANDARD
variable will be honoured if set, but if --standard
is provided it will be used instead.
The --standard
option accepts any value that the FSL_STANDARD
environment variable accepts - one of:
- a template dataset identifier (the name of a sub-directory within
$FSLDIR/data/
) - the path to a directory containing a template data set
Examples:
# use OMM templates from $FSLDIR/data/omm/Oxford-MM-1
$ fsl_get_standard --standard omm/Oxford-MM-1
/usr/local/fsl/data/omm/Oxford-MM-1/OMM-1_T1_head.nii.gz
# use OMM templates from local clone of omm repository
$ fsl_get_standard --standard ~/my-local-projects/oxford-mm-templates/Oxford-MM-1
/home/paulmc/my-local-projects/oxford-mm-templates/Oxford-MM-1/OMM-1_T1_head.nii.gz
This MR also makes the fsl_get_standard
interface a little more flexible - previously, the default modality/resolution values were set to the first modality/resolution that was listed in the dataset manifest.txt
file. This could result in invalid values, e.g. if a particular image type did not have the default modality/resolution. Now, if the modality and/or resolution is not specified, the first file in manifest.txt
for the requested image type is selected.
Finally, the $FSLDIR/data/standard/FMRIB58_FA_1mm.nii.gz
and $FSLDIR/data/standard/FMRIB58_FA-skeleton_1mm.nii.gz
files have been added to the default MNI152 manifest, e.g.:
$ fsl_get_standard FA
/usr/local/fsl/data/standard/FMRIB58_FA_1mm.nii.gz
$ fsl_get_standard FA_skeleton
/usr/local/fsl/data/standard/FMRIB58_FA-skeleton_1mm.nii.gz