This Page

medpy.io.header.set_offset

medpy.io.header.set_offset(hdr, offset)[source]

Sets the offset (aka origin) in the image header.

Parameters:

hdr : medpy.io.Header

An image header as returned by load.

offset : tuple of floats

The desired offset.

Notes

It is recommended to call hdr.set_offset() instead of this function. The offset is based on the center of the first voxel. See also get_offset for more details.