fsl.scripts.imglob

This module defines the imglob application, which identifies unique NIFTI/ANALYZE image files.

fsl.scripts.imglob.imglob(paths, output=None)

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 each
      matching 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.

fsl.scripts.imglob.main(argv=None)

The imglob application. Given a list of file names, identifies and prints the unique NIFTI/ANALYZE image files.