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
Model registry
Operate
Environments
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
FSL
fslpy
Commits
9a30c50e
Commit
9a30c50e
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
BF: Bug in ImageWrapper for vector images
parent
c65caa5a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fsl/data/imagewrapper.py
+5
-5
5 additions, 5 deletions
fsl/data/imagewrapper.py
with
5 additions
and
5 deletions
fsl/data/imagewrapper.py
+
5
−
5
View file @
9a30c50e
...
@@ -190,10 +190,10 @@ class ImageWrapper(notifier.Notifier):
...
@@ -190,10 +190,10 @@ class ImageWrapper(notifier.Notifier):
if
d
==
1
:
self
.
__numRealDims
-=
1
if
d
==
1
:
self
.
__numRealDims
-=
1
else
:
break
else
:
break
# Degenerate case -
if every
# Degenerate case -
less
#
dimension has length 1
#
than three real dimensions
if
self
.
__numRealDims
==
0
:
if
self
.
__numRealDims
<
3
:
self
.
__numRealDims
=
len
(
image
.
shape
)
self
.
__numRealDims
=
min
(
3
,
len
(
image
.
shape
)
)
# And save the number of
# And save the number of
# 'padding' dimensions too.
# 'padding' dimensions too.
...
@@ -705,7 +705,7 @@ class ImageWrapper(notifier.Notifier):
...
@@ -705,7 +705,7 @@ class ImageWrapper(notifier.Notifier):
raise
IndexError
(
'
Invalid assignment: [{}] = {}
'
.
format
(
raise
IndexError
(
'
Invalid assignment: [{}] = {}
'
.
format
(
sliceobj
,
len
(
values
)))
sliceobj
,
len
(
values
)))
values
=
values
[
0
]
values
=
np
.
array
(
values
).
flatten
()
[
0
]
# Make sure that the values
# Make sure that the values
# have a compatible shape.
# have a compatible shape.
...
...
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