fsl.scripts.imglob
This module defines the imglob
application, which identifies unique
NIFTI/ANALYZE image files.
- fsl.scripts.imglob.exts = ['.nii.gz', '.nii', '.img', '.hdr', '.img.gz', '.hdr.gz']
List of supported image file extensions.
- fsl.scripts.imglob.groups = [('.hdr', '.img'), ('.hdr.gz', '.img.gz')]
List of known image file groups (image/header file pairs).
- fsl.scripts.imglob.imglob(paths, output=None)[source]
Given a list of file names, identifies and returns the unique NIFTI/ANALYZE image files that exist.
- Parameters:
paths – Sequence of paths/prefixes to glob.
output –
One of
'prefix'
(the default),'all'
, or'primary'
:'prefix'
: Returns the files without extensions.'all'
: Returns all files that match (e.g. both.img
and.hdr
files will be returned).
'primary'
: Returns only the primary file of eachmatching file group, e.g. only the
.hdr
file would be returned from an.img
/.hdr
pair.
- Returns:
A sequence of resolved path names, in the form specified by the
output
parameter.