Image I/O functionalities (medpy.io)#

This package provides functionalities for loading and saving images, as well as the handling of image metadata.

Loading an image#

load(image)

Loads the image and returns a ndarray with the image's pixel content as well as a header object.

Saving an image#

save(arr, filename[, hdr, force, ...])

Save the image arr as filename using information encoded in hdr.

Reading / writing metadata (medpy.io.header)#

Header([spacing, offset, direction, sitkimage])

A medpy header object.