fsl.scripts.resample_image

This module defines the resample_image script, for resampling a NIfTI image.

fsl.scripts.resample_image.intlist(val)[source]

Turn a string of comma-separated ints into a list of ints.

fsl.scripts.resample_image.floatlist(val)[source]

Turn a string of comma-separated floats into a list of floats.

fsl.scripts.resample_image.sanitiseList(parser, vals, img, arg)[source]

Make sure that vals has the same number of elements as img has dimensions. Used to sanitise the --shape and --dim options.

fsl.scripts.resample_image.parseArgs(argv)[source]

Parses command-line arguments.

Parameters:

argv – Sequence of command-line arguments

Returns:

An argparse.Namespace object containing parsed arguments.

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

Entry point for resample_image. Parses arguments, resamples the input image, and saves it to the specified output file.

Parameters:

argv – Sequence of command-line arguments. If not provided, taken from sys.argv.