try:
if __is_header_nibabel(hdr):
return __get_pixel_spacing_nibabel(hdr)
elif __is_header_pydicom(hdr):
return __get_pixel_spacing_pydicom(hdr)
elif __is_header_itk(hdr):
return __get_pixel_spacing_itk(hdr)
else:
raise Exception()
except Exception:
raise AttributeError("The provided header {} is of unknown type or does not support queries for pixel spacing.".format(type(hdr)))
def get_offset(hdr):