NiBabel

Access a cacophony of neuro-imaging file formats

Previous topic

nibabel.volumeutils.Recoder

Next topic

nibabel.volumeutils.apply_read_scaling

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.