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

BF: Image can no longer clear headerref

parent a72acc33
......@@ -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
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
......@@ -1198,8 +1203,7 @@ class Image(Nifti):
def __del__(self):
"""Closes any open file handles, and clears some references. """
self.header = None
self.__nibImage = None
self.__imageWrapper = None
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