Skip to content

Commit 4623e12

Browse files
committed
FIX: Improved test for scaling
1 parent 4e985a7 commit 4623e12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/cmdline/roi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def lossless_slice(img, slicers):
88
if not nb.imageclasses.spatial_axes_first(img):
99
raise ValueError("Cannot slice an image that is not known to have spatial axes first")
1010

11-
scaling = hasattr(img.dataobj, 'slope')
11+
scaling = hasattr(img.header, 'set_slope_inter')
1212

1313
data = img.dataobj._get_unscaled(slicers) if scaling else img.dataobj[slicers]
1414
roi_img = img.__class__(data, affine=img.slicer.slice_affine(slicers), header=img.header)

0 commit comments

Comments
 (0)