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
e3f6c86f
Commit
e3f6c86f
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Update refs to deprecated methods
parent
40650612
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/test_atlases_query.py
+6
-6
6 additions, 6 deletions
tests/test_atlases_query.py
tests/test_scripts/test_atlasq_ohi.py
+2
-2
2 additions, 2 deletions
tests/test_scripts/test_atlasq_ohi.py
tests/test_scripts/test_atlasq_query.py
+2
-2
2 additions, 2 deletions
tests/test_scripts/test_atlasq_query.py
with
10 additions
and
10 deletions
tests/test_atlases_query.py
+
6
−
6
View file @
e3f6c86f
...
@@ -218,8 +218,8 @@ def _eval_coord_voxel_query(atlas, query, qtype, qin):
...
@@ -218,8 +218,8 @@ def _eval_coord_voxel_query(atlas, query, qtype, qin):
elif
qin
==
'
out
'
:
elif
qin
==
'
out
'
:
expval
=
[]
expval
=
[]
assert
atlas
.
proportion
s
(
query
,
voxel
=
voxel
)
==
expval
assert
atlas
.
value
s
(
query
,
voxel
=
voxel
)
==
expval
assert
atlas
.
coord
Proportion
s
(
query
,
voxel
=
voxel
)
==
expval
assert
atlas
.
coord
Value
s
(
query
,
voxel
=
voxel
)
==
expval
if
isinstance
(
atlas
,
fslatlases
.
LabelAtlas
):
evalLabel
()
if
isinstance
(
atlas
,
fslatlases
.
LabelAtlas
):
evalLabel
()
elif
isinstance
(
atlas
,
fslatlases
.
ProbabilisticAtlas
):
evalProb
()
elif
isinstance
(
atlas
,
fslatlases
.
ProbabilisticAtlas
):
evalProb
()
...
@@ -343,13 +343,13 @@ def _eval_mask_query(atlas, query, qtype, qin):
...
@@ -343,13 +343,13 @@ def _eval_mask_query(atlas, query, qtype, qin):
if
qin
==
'
out
'
:
if
qin
==
'
out
'
:
with
pytest
.
raises
(
fslatlases
.
MaskError
):
with
pytest
.
raises
(
fslatlases
.
MaskError
):
atlas
.
mask
Proportion
s
(
mask
)
atlas
.
mask
Value
s
(
mask
)
with
pytest
.
raises
(
fslatlases
.
MaskError
):
with
pytest
.
raises
(
fslatlases
.
MaskError
):
atlas
.
proportion
s
(
mask
)
atlas
.
value
s
(
mask
)
return
return
props
=
atlas
.
proportion
s
(
mask
)
props
=
atlas
.
value
s
(
mask
)
props2
=
atlas
.
mask
Proportion
s
(
mask
)
props2
=
atlas
.
mask
Value
s
(
mask
)
assert
np
.
all
(
np
.
isclose
(
props
,
props2
))
assert
np
.
all
(
np
.
isclose
(
props
,
props2
))
...
...
This diff is collapsed.
Click to expand it.
tests/test_scripts/test_atlasq_ohi.py
+
2
−
2
View file @
e3f6c86f
...
@@ -51,7 +51,7 @@ def test_coords(seed):
...
@@ -51,7 +51,7 @@ def test_coords(seed):
"""
Test the ohi -a
"
atlas
"
-c
"
coords
"
mode.
"""
"""
Test the ohi -a
"
atlas
"
-c
"
coords
"
mode.
"""
def
expectedProbOutput
(
atlas
,
coords
):
def
expectedProbOutput
(
atlas
,
coords
):
probs
=
atlas
.
proportion
s
(
coords
)
probs
=
atlas
.
value
s
(
coords
)
expected
=
'
<b>{}</b><br>
'
.
format
(
atlas
.
desc
.
name
)
expected
=
'
<b>{}</b><br>
'
.
format
(
atlas
.
desc
.
name
)
nzprobs
=
[]
nzprobs
=
[]
...
@@ -161,7 +161,7 @@ def test_mask(seed):
...
@@ -161,7 +161,7 @@ def test_mask(seed):
def
expectedProbOutput
(
mask
,
atlas
):
def
expectedProbOutput
(
mask
,
atlas
):
props
=
atlas
.
mask
Proportion
s
(
mask
)
props
=
atlas
.
mask
Value
s
(
mask
)
labels
=
[
l
.
index
for
l
in
atlas
.
desc
.
labels
]
labels
=
[
l
.
index
for
l
in
atlas
.
desc
.
labels
]
exp
=
[]
exp
=
[]
...
...
This diff is collapsed.
Click to expand it.
tests/test_scripts/test_atlasq_query.py
+
2
−
2
View file @
e3f6c86f
...
@@ -294,7 +294,7 @@ def _eval_coord_voxel_query(
...
@@ -294,7 +294,7 @@ def _eval_coord_voxel_query(
if
o_type
==
'
normal
'
:
evalLabelNormalOutput
(
explabel
)
if
o_type
==
'
normal
'
:
evalLabelNormalOutput
(
explabel
)
else
:
evalLabelShortOutput
(
explabel
)
else
:
evalLabelShortOutput
(
explabel
)
elif
isinstance
(
a_img
,
fslatlases
.
ProbabilisticAtlas
):
elif
isinstance
(
a_img
,
fslatlases
.
ProbabilisticAtlas
):
expprops
=
a_img
.
proportion
s
(
query
,
voxel
=
voxel
)
expprops
=
a_img
.
value
s
(
query
,
voxel
=
voxel
)
if
o_type
==
'
normal
'
:
evalProbNormalOutput
(
expprops
)
if
o_type
==
'
normal
'
:
evalProbNormalOutput
(
expprops
)
else
:
evalProbShortOutput
(
expprops
)
else
:
evalProbShortOutput
(
expprops
)
...
@@ -400,7 +400,7 @@ def _eval_mask_query(
...
@@ -400,7 +400,7 @@ def _eval_mask_query(
explabels
,
expprops
=
[],
[]
explabels
,
expprops
=
[],
[]
elif
isinstance
(
aimg
,
fslatlases
.
ProbabilisticAtlas
):
elif
isinstance
(
aimg
,
fslatlases
.
ProbabilisticAtlas
):
try
:
try
:
expprops
=
aimg
.
mask
Proportion
s
(
maskimg
)
expprops
=
aimg
.
mask
Value
s
(
maskimg
)
explabels
=
aimg
.
desc
.
labels
explabels
=
aimg
.
desc
.
labels
except
fslatlases
.
MaskError
:
except
fslatlases
.
MaskError
:
explabels
=
[]
explabels
=
[]
...
...
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