From 2ecdee6be566e3c0ddc1bcd42c30193abebda650 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Wed, 29 Jun 2016 14:10:05 +0100 Subject: [PATCH] If Image(loadData=True), threaded/indexed arguments are ignored. --- fsl/data/image.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fsl/data/image.py b/fsl/data/image.py index d2d7e967a..1eece553b 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -406,12 +406,13 @@ class Image(Nifti1, notifier.Notifier): :arg indexed: If ``True``, and the file is gzipped, it is opened using the :mod:`indexed_gzip` package. Otherwise the - file is opened by ``nibabel``. + 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``. + to ``False``. Ignored if ``loadData`` is ``True``. """ import nibabel as nib @@ -420,6 +421,10 @@ class Image(Nifti1, notifier.Notifier): dataSource = None fileobj = None + if loadData: + indexed = False + threaded = False + # The image parameter may be the name of an image file if isinstance(image, six.string_types): -- GitLab