imageio.v2.mvolread#

imageio.v2.mvolread(uri, format=None, memtest='1GB', **kwargs)[source]#

Reads multiple volumes from the specified file. Returns a list of numpy arrays, each with a dict of meta data at its ‘meta’ attribute.

Parameters:
uri{str, pathlib.Path, bytes, file}

The resource to load the volumes from, e.g. a filename, pathlib.Path, http address or file object, see the docs for more info.

formatstr

The format to use to read the file. By default imageio selects the appropriate for you based on the filename and its contents.

memtest{bool, int, float, str}

If truthy, this function will raise an error if the resulting list of images consumes greater than the amount of memory specified. This is to protect the system from using so much memory that it needs to resort to swapping, and thereby stall the computer. E.g. mimread('hunger_games.avi').

If the argument is a number, that will be used as the threshold number of bytes.

If the argument is a string, it will be interpreted as a number of bytes with SI/IEC prefixed units (e.g. ‘1kB’, ‘250MiB’, ‘80.3YB’).

  • Units are case sensitive

  • k, M etc. represent a 1000-fold change, where Ki, Mi etc. represent 1024-fold

  • The “B” is optional, but if present, must be capitalised

If the argument is True, the default will be used, for compatibility reasons.

Default: ‘1GB’

kwargs

Further keyword arguments are passed to the reader. See help() to see what arguments are available for a particular format.