diff --git a/fsl/data/image.py b/fsl/data/image.py index 1eece553bffe3ea6efcfef787466fa6dcd856d8d..9ad5aa2e285e2ca3e70949e84290877afd1a8567 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -322,7 +322,7 @@ class Image(Nifti1, notifier.Notifier): as properties (https://docs.python.org/2/library/functions.html#property): - ============== ====================================================== + ============== =========================================================== ``name`` The name of this ``Image`` - defaults to the image file name, sans-suffix. @@ -341,7 +341,7 @@ class Image(Nifti1, notifier.Notifier): :meth:`__init__`, this may be calculated when the ``Image`` is created, or may be incrementally updated as more image data is loaded from disk. - ============== ====================================================== + ============== =========================================================== The ``Image`` class implements the :class:`.Notifier` interface - @@ -409,7 +409,6 @@ class Image(Nifti1, notifier.Notifier): file is opened by ``nibabel``. Ignored if ``loadData`` is ``True``. - :arg threaded: If ``True``, the :class:`.ImageWrapper` will use a separate thread for data range calculation. Defaults to ``False``. Ignored if ``loadData`` is ``True``. diff --git a/fsl/data/imagewrapper.py b/fsl/data/imagewrapper.py index dd13a7aaff3811cfe848b45523d7e96753128f3b..6358a1b679f503d7d263c636fe952ddf5911bbe3 100644 --- a/fsl/data/imagewrapper.py +++ b/fsl/data/imagewrapper.py @@ -149,8 +149,9 @@ class ImageWrapper(notifier.Notifier): data range is updated directly on reads/writes. """ - self.__image = image - self.__name = name + self.__image = image + self.__name = name + self.__taskThread = None # Save the number of 'real' dimensions, # that is the number of dimensions minus @@ -177,9 +178,7 @@ class ImageWrapper(notifier.Notifier): if loadData: self.loadData() - if not threaded: - self.__taskThread = None - else: + if threaded: self.__taskThread = async.TaskThread() self.__taskThread.start()