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
c47b9269
Commit
c47b9269
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
BF: Image can no longer clear headerref
parent
a72acc33
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
+7
-3
7 additions, 3 deletions
fsl/data/image.py
with
7 additions
and
3 deletions
fsl/data/image.py
+
7
−
3
View file @
c47b9269
...
@@ -262,6 +262,11 @@ class Nifti(notifier.Notifier, meta.Meta):
...
@@ -262,6 +262,11 @@ class Nifti(notifier.Notifier, meta.Meta):
self
.
__isNeurological
=
isneuro
self
.
__isNeurological
=
isneuro
def
__del__
(
self
):
"""
Clears the reference to the ``nibabel`` header object.
"""
self
.
__header
=
None
@staticmethod
@staticmethod
def
determineShape
(
header
):
def
determineShape
(
header
):
"""
This method is called by :meth:`__init__`. It figures out the actual
"""
This method is called by :meth:`__init__`. It figures out the actual
...
@@ -507,7 +512,7 @@ class Nifti(notifier.Notifier, meta.Meta):
...
@@ -507,7 +512,7 @@ class Nifti(notifier.Notifier, meta.Meta):
new
=
Nifti
(
header
)
new
=
Nifti
(
header
)
if
not
(
self
.
sameSpace
(
new
)
and
self
.
ndim
==
new
.
ndim
):
if
not
(
self
.
sameSpace
(
new
)
and
self
.
ndim
==
new
.
ndim
):
raise
ValueError
(
'
Incompatible header
'
)
raise
ValueError
(
'
Incompatible header
'
)
self
.
__header
=
new
self
.
__header
=
header
@property
@property
...
@@ -1198,8 +1203,7 @@ class Image(Nifti):
...
@@ -1198,8 +1203,7 @@ class Image(Nifti):
def
__del__
(
self
):
def
__del__
(
self
):
"""
Closes any open file handles, and clears some references.
"""
"""
Closes any open file handles, and clears some references.
"""
Nifti
.
__del__
(
self
)
self
.
header
=
None
self
.
__nibImage
=
None
self
.
__nibImage
=
None
self
.
__imageWrapper
=
None
self
.
__imageWrapper
=
None
...
...
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