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
e20eaf04
Commit
e20eaf04
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Update image tests for new ndim and data attributes.
parent
482a1290
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
tests/test_image.py
+5
-3
5 additions, 3 deletions
tests/test_image.py
with
5 additions
and
3 deletions
tests/test_image.py
+
5
−
3
View file @
e20eaf04
...
@@ -285,11 +285,12 @@ def _test_Image_atts(imgtype):
...
@@ -285,11 +285,12 @@ def _test_Image_atts(imgtype):
i
=
fslimage
.
Image
(
path
)
i
=
fslimage
.
Image
(
path
)
assert
tuple
(
i
.
shape
)
==
tuple
(
expdims
)
assert
tuple
(
i
.
shape
)
==
tuple
(
expdims
)
assert
tuple
(
i
.
data
.
shape
)
==
tuple
(
expdims
)
assert
tuple
(
i
.
pixdim
)
==
tuple
(
exppixdims
)
assert
tuple
(
i
.
pixdim
)
==
tuple
(
exppixdims
)
assert
tuple
(
i
.
nibImage
.
shape
)
==
tuple
(
dims
)
assert
tuple
(
i
.
nibImage
.
shape
)
==
tuple
(
dims
)
assert
tuple
(
i
.
nibImage
.
header
.
get_zooms
())
==
tuple
(
pixdims
)
assert
tuple
(
i
.
nibImage
.
header
.
get_zooms
())
==
tuple
(
pixdims
)
assert
i
.
ndim
s
==
expndims
assert
i
.
ndim
==
expndims
assert
i
.
dtype
==
dtype
assert
i
.
dtype
==
dtype
assert
i
.
name
==
op
.
basename
(
path
)
assert
i
.
name
==
op
.
basename
(
path
)
assert
i
.
dataSource
==
fslpath
.
addExt
(
path
,
assert
i
.
dataSource
==
fslpath
.
addExt
(
path
,
...
@@ -859,8 +860,9 @@ def _test_Image_5D(imgtype):
...
@@ -859,8 +860,9 @@ def _test_Image_5D(imgtype):
img
=
fslimage
.
Image
(
path
)
img
=
fslimage
.
Image
(
path
)
assert
img
.
shape
==
dims
assert
img
.
shape
==
dims
assert
img
.
ndims
==
5
assert
img
.
ndim
==
5
assert
img
.
data
.
shape
==
dims
def
test_Image_voxToScaledVox_analyze
():
_test_Image_voxToScaledVox
(
0
)
def
test_Image_voxToScaledVox_analyze
():
_test_Image_voxToScaledVox
(
0
)
...
...
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