We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
apply()
1 parent be5ddd6 commit 01cb7cdCopy full SHA for 01cb7cd
nitransforms/resampling.py
@@ -19,6 +19,7 @@
19
from nibabel.loadsave import load as _nbload
20
from nibabel.arrayproxy import get_obj_dtype
21
from nibabel.spatialimages import SpatialImage
22
+from nibabel.funcs import squeeze_image
23
from scipy import ndimage as ndi
24
25
from nitransforms.base import (
@@ -233,6 +234,8 @@ def apply(
233
234
if isinstance(spatialimage, (str, Path)):
235
spatialimage = _nbload(str(spatialimage))
236
237
+ spatialimage = squeeze_image(spatialimage)
238
+
239
# Avoid opening the data array just yet
240
input_dtype = cap_dtype(get_obj_dtype(spatialimage.dataobj), dtype_width)
241
0 commit comments