diff --git a/fsl/data/image.py b/fsl/data/image.py index 5d8f860a4dfabddfc0351ce9c27c5456f405db04..6c55b2e6c470fb83bd641c4d94d94900a8f91b5c 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -416,6 +416,11 @@ class Image(Nifti1, props.HasProperties): if self.is4DImage() and vol is None: raise ValueError('Volume must be specified for 4D images') + + newVals = np.array(newVals) + + if newVals.size == 0: + return data = self.data xlo, ylo, zlo = offset