Skip to content
Snippets Groups Projects
Commit b733c486 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

BF: Image setitem notifier was returning the un-normalised slice object,

instead of the normalised one (with trailing dimensions of length 1 removed)
parent a3d0cfa7
No related branches found
No related tags found
No related merge requests found
...@@ -1711,7 +1711,8 @@ class Image(Nifti): ...@@ -1711,7 +1711,8 @@ class Image(Nifti):
log.debug('%s: __setitem__ [%s = %s]', self.name, slc, values.shape) log.debug('%s: __setitem__ [%s = %s]', self.name, slc, values.shape)
realShape = self.realShape realShape = self.realShape
slc = canonicalSliceObj(slc, realShape) origslc = slc
slc = canonicalSliceObj(origslc, realShape)
# If the image shape does not match its # If the image shape does not match its
# 'display' shape (either less three # 'display' shape (either less three
...@@ -1757,7 +1758,7 @@ class Image(Nifti): ...@@ -1757,7 +1758,7 @@ class Image(Nifti):
self.__dataRange = None self.__dataRange = None
# Notify that data has changed/image is not saved # Notify that data has changed/image is not saved
self.notify(topic='data', value=slc) self.notify(topic='data', value=origslc)
if self.__saveState: if self.__saveState:
self.__saveState = False self.__saveState = False
self.notify(topic='saveState') self.notify(topic='saveState')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment