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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Evan Edmond
fslpy
Commits
8381891b
Commit
8381891b
authored
8 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Fixed if ImageWrapper.__init__ crashes, ImageWrapper.__del__ complains
because __taskThread attr does not exist.
parent
866eb387
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/data/image.py
+2
-3
2 additions, 3 deletions
fsl/data/image.py
fsl/data/imagewrapper.py
+4
-5
4 additions, 5 deletions
fsl/data/imagewrapper.py
with
6 additions
and
8 deletions
fsl/data/image.py
+
2
−
3
View file @
8381891b
...
...
@@ -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``.
...
...
This diff is collapsed.
Click to expand it.
fsl/data/imagewrapper.py
+
4
−
5
View file @
8381891b
...
...
@@ -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
()
...
...
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