Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
fslpy
Commits
e7341f65
Commit
e7341f65
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
BF: Image creation does not fail if a sidecar file with invalid JSON is
present
parent
0a972e0c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/image.py
+9
-1
9 additions, 1 deletion
fsl/data/image.py
with
9 additions
and
1 deletion
fsl/data/image.py
+
9
−
1
View file @
e7341f65
...
@@ -1162,11 +1162,19 @@ class Image(Nifti):
...
@@ -1162,11 +1162,19 @@ class Image(Nifti):
self
.
register
(
self
.
name
,
self
.
__headerChanged
,
topic
=
'
transform
'
)
self
.
register
(
self
.
name
,
self
.
__headerChanged
,
topic
=
'
transform
'
)
self
.
register
(
self
.
name
,
self
.
__headerChanged
,
topic
=
'
header
'
)
self
.
register
(
self
.
name
,
self
.
__headerChanged
,
topic
=
'
header
'
)
# calculate min/max
# of image data
if
calcRange
:
if
calcRange
:
self
.
calcRange
()
self
.
calcRange
()
# try and load metadata
# from JSON sidecar files
if
self
.
dataSource
is
not
None
and
loadMeta
:
if
self
.
dataSource
is
not
None
and
loadMeta
:
self
.
updateMeta
(
loadMetadata
(
self
))
try
:
self
.
updateMeta
(
loadMetadata
(
self
))
except
Exception
as
e
:
log
.
warning
(
'
Failed to load metadata for %s: %s
'
,
self
.
dataSource
,
e
)
self
.
__imageWrapper
.
register
(
self
.
__lName
,
self
.
__dataRangeChanged
)
self
.
__imageWrapper
.
register
(
self
.
__lName
,
self
.
__dataRangeChanged
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment