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
740e6774
Commit
740e6774
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: fix gifti test
parent
c8188800
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_gifti.py
+9
-3
9 additions, 3 deletions
tests/test_gifti.py
with
9 additions
and
3 deletions
tests/test_gifti.py
+
9
−
3
View file @
740e6774
...
...
@@ -292,7 +292,7 @@ def test_GiftiMesh_multiple_vertices():
TEST_VERTS
*
10
,
intent
=
'
NIFTI_INTENT_POINTSET
'
)
gimg
=
nib
.
gifti
.
GiftiImage
(
darrays
=
[
verts1
,
verts2
,
tris
])
gimg2
=
nib
.
gifti
.
GiftiImage
(
darrays
=
[
verts3
])
gimg2
=
nib
.
gifti
.
GiftiImage
(
darrays
=
[
verts3
,
tris
])
with
tempdir
():
fname
=
op
.
abspath
(
'
test.gii
'
)
...
...
@@ -302,18 +302,24 @@ def test_GiftiMesh_multiple_vertices():
surf
=
gifti
.
GiftiMesh
(
fname
)
expvsets
=
[
fname
,
'
{}_1
'
.
format
(
fname
)]
expvsets
=
[
fname
,
'
{}_1
'
.
format
(
fname
)]
expbounds1
=
np
.
min
(
verts1
.
data
,
axis
=
0
),
np
.
max
(
verts1
.
data
,
axis
=
0
)
expbounds2
=
np
.
min
(
verts2
.
data
,
axis
=
0
),
np
.
max
(
verts2
.
data
,
axis
=
0
)
expbounds3
=
np
.
min
(
verts3
.
data
,
axis
=
0
),
np
.
max
(
verts3
.
data
,
axis
=
0
)
assert
np
.
all
(
surf
.
vertices
==
TEST_VERTS
)
assert
np
.
all
(
surf
.
indices
==
TEST_IDXS
)
assert
surf
.
vertexSets
()
==
expvsets
assert
np
.
all
(
np
.
isclose
(
surf
.
bounds
,
expbounds1
))
surf
.
vertices
=
expvsets
[
1
]
assert
np
.
all
(
surf
.
vertices
==
TEST_VERTS
*
5
)
assert
np
.
all
(
np
.
isclose
(
surf
.
bounds
,
expbounds2
))
surf
.
loadVertices
(
fname2
,
select
=
True
)
assert
np
.
all
(
surf
.
vertices
==
TEST_VERTS
*
10
)
assert
np
.
all
(
np
.
isclose
(
surf
.
bounds
,
expbounds3
))
def
test_GiftiMesh_needsFixing
():
...
...
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