fsl.data.utils

This module is home to some miscellaneous utility functions for working with the data types defined in the fsl.data package.

fsl.data.utils.guessType(path)[source]

A convenience function which, given the name of a file or directory, attempts to figure out a suitable data type.

Returns a tuple containing two values - a type which should be able to load the path, and the path itself, possibly adjusted. If the type is unrecognised, the first tuple value will be None.

fsl.data.utils.makeWriteable(array)[source]

Updates the given numpy.array so that it is writeable. If this is not possible, a copy is created and returned.