fsl.scripts.imtest

The imtest script can be used to test whether an image file exists or not, without having to know the file suffix (.nii, .nii.gz, etc).

fsl.scripts.imtest.exts = ['.nii.gz', '.nii', '.img', '.hdr', '.img.gz', '.hdr.gz', '.mnc', '.mnc.gz']

List of file extensions that are supported by imtest.

fsl.scripts.imtest.groups = [('.hdr', '.img'), ('.hdr.gz', '.img.gz')]

List of known image file groups (image/header file pairs).

fsl.scripts.imtest.imtest(path)[source]

Returns True if the given image path exists, False otherwise.

fsl.scripts.imtest.main(argv=None)[source]

Test if an image path exists, and prints '1' if it does or '0' if it doesn’t.