Commit b6cf8d8c authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Image creation does not fail if a sidecar file with invalid JSON is

parent 081a43cc
......@@ -1162,11 +1162,19 @@ class Image(Nifti):
self.register(, self.__headerChanged, topic='transform')
self.register(, self.__headerChanged, topic='header')
# calculate min/max
# of image data
if calcRange:
# try and load metadata
# from JSON sidecar files
if self.dataSource is not None and loadMeta:
except Exception as e:
log.warning('Failed to load metadata for %s: %s',
self.dataSource, e)
self.__imageWrapper.register(self.__lName, self.__dataRangeChanged)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment