Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
2993fd33
Commit
2993fd33
authored
Feb 28, 2020
by
Paul McCarthy
🚵
Browse files
BF: Image can no longer clear headerref
parent
63e644ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/data/image.py
View file @
2993fd33
...
...
@@ -262,6 +262,11 @@ class Nifti(notifier.Notifier, meta.Meta):
self
.
__isNeurological
=
isneuro
def
__del__
(
self
):
"""Clears the reference to the ``nibabel`` header object. """
self
.
__header
=
None
@
staticmethod
def
determineShape
(
header
):
"""This method is called by :meth:`__init__`. It figures out the actual
...
...
@@ -507,7 +512,7 @@ class Nifti(notifier.Notifier, meta.Meta):
new
=
Nifti
(
header
)
if
not
(
self
.
sameSpace
(
new
)
and
self
.
ndim
==
new
.
ndim
):
raise
ValueError
(
'Incompatible header'
)
self
.
__header
=
new
self
.
__header
=
header
@
property
...
...
@@ -1198,8 +1203,7 @@ class Image(Nifti):
def
__del__
(
self
):
"""Closes any open file handles, and clears some references. """
self
.
header
=
None
Nifti
.
__del__
(
self
)
self
.
__nibImage
=
None
self
.
__imageWrapper
=
None
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment