We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e985a7 commit 4623e12Copy full SHA for 4623e12
nibabel/cmdline/roi.py
@@ -8,7 +8,7 @@ def lossless_slice(img, slicers):
8
if not nb.imageclasses.spatial_axes_first(img):
9
raise ValueError("Cannot slice an image that is not known to have spatial axes first")
10
11
- scaling = hasattr(img.dataobj, 'slope')
+ scaling = hasattr(img.header, 'set_slope_inter')
12
13
data = img.dataobj._get_unscaled(slicers) if scaling else img.dataobj[slicers]
14
roi_img = img.__class__(data, affine=img.slicer.slice_affine(slicers), header=img.header)
0 commit comments