diff --git a/fsl/data/imagewrapper.py b/fsl/data/imagewrapper.py index d2b4fb9169a862dbb102807a06abba44036bb546..559c0d974f5563edbafef459870cbbb5b504ddac 100644 --- a/fsl/data/imagewrapper.py +++ b/fsl/data/imagewrapper.py @@ -825,6 +825,8 @@ def expectedShape(sliceobj, shape): if start is None: start = 0 if stop is None: stop = shape[i] + stop = min(stop, shape[i]) + expShape.append(stop - start) return len(expShape), expShape