NiBabel

Access a cacophony of neuro-imaging file formats

Next topic

nibabel.volumeutils.array_from_file

This Page

Reggie -- the one

nibabel.volumeutils.allopen

nibabel.volumeutils.allopen(fname, *args, **kwargs)

Generic file-like object open

If input fname already looks like a file, pass through. If fname ends with recognizable compressed types, use python libraries to open as file-like objects (read or write) Otherwise, use standard open.