medpy.io.header.get_offset¶
-
medpy.io.header.
get_offset
(hdr)[source]¶ Extracts the image offset (akak origin) from an image header.
Parameters: hdr : medpy.io.Header
An image header as returned by load.
Returns: offset : tuple of floats
The image’s offset.
Notes
It is recommended to call hdr.get_offset() instead of this function. It can be assumed that the offset is measured from the center point of the first pixel, which SimpleITK promises independent of the file format. Some formats do not specify a header field for the offset, thus zeros are returned.