Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Michiel Cottaar
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
No related tags found
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):
...
@@ -322,7 +322,7 @@ class Image(Nifti1, notifier.Notifier):
as properties (https://docs.python.org/2/library/functions.html#property):
as properties (https://docs.python.org/2/library/functions.html#property):
============== ======================================================
============== ======================================================
=====
``name`` The name of this ``Image`` - defaults to the image
``name`` The name of this ``Image`` - defaults to the image
file name, sans-suffix.
file name, sans-suffix.
...
@@ -341,7 +341,7 @@ class Image(Nifti1, notifier.Notifier):
...
@@ -341,7 +341,7 @@ class Image(Nifti1, notifier.Notifier):
:meth:`__init__`, this may be calculated when the ``Image``
:meth:`__init__`, this may be calculated when the ``Image``
is created, or may be incrementally updated as more image
is created, or may be incrementally updated as more image
data is loaded from disk.
data is loaded from disk.
============== ======================================================
============== ======================================================
=====
The ``Image`` class implements the :class:`.Notifier` interface -
The ``Image`` class implements the :class:`.Notifier` interface -
...
@@ -409,7 +409,6 @@ class Image(Nifti1, notifier.Notifier):
...
@@ -409,7 +409,6 @@ class Image(Nifti1, notifier.Notifier):
file is opened by ``nibabel``. Ignored if ``loadData``
file is opened by ``nibabel``. Ignored if ``loadData``
is ``True``.
is ``True``.
:arg threaded: If ``True``, the :class:`.ImageWrapper` will use a
:arg threaded: If ``True``, the :class:`.ImageWrapper` will use a
separate thread for data range calculation. Defaults
separate thread for data range calculation. Defaults
to ``False``. Ignored if ``loadData`` is ``True``.
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):
...
@@ -149,8 +149,9 @@ class ImageWrapper(notifier.Notifier):
data range is updated directly on reads/writes.
data range is updated directly on reads/writes.
"""
"""
self
.
__image
=
image
self
.
__image
=
image
self
.
__name
=
name
self
.
__name
=
name
self
.
__taskThread
=
None
# Save the number of 'real' dimensions,
# Save the number of 'real' dimensions,
# that is the number of dimensions minus
# that is the number of dimensions minus
...
@@ -177,9 +178,7 @@ class ImageWrapper(notifier.Notifier):
...
@@ -177,9 +178,7 @@ class ImageWrapper(notifier.Notifier):
if
loadData
:
if
loadData
:
self
.
loadData
()
self
.
loadData
()
if
not
threaded
:
if
threaded
:
self
.
__taskThread
=
None
else
:
self
.
__taskThread
=
async
.
TaskThread
()
self
.
__taskThread
=
async
.
TaskThread
()
self
.
__taskThread
.
start
()
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