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
2ad3a364
Commit
2ad3a364
authored
7 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Adjustments to atlasq tests
parent
de5013fc
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_atlasq_query.py
+7
-15
7 additions, 15 deletions
tests/test_atlasq_query.py
with
7 additions
and
15 deletions
tests/test_atlasq_query.py
+
7
−
15
View file @
2ad3a364
...
...
@@ -29,7 +29,7 @@ def setup_module():
raise
Exception
(
'
FSLDIR is not set - atlas tests cannot be run
'
)
atlases
=
[
'
harvardoxford-subcortical
'
,
'
talairach
'
]
atlases
=
[
'
mni
'
,
'
talairach
'
]
# False: do not use the --label flag
# True: use the --label flag
...
...
@@ -110,20 +110,8 @@ def _test_query(tests):
o_type
)
_atlases
=
{}
def
_get_atlas
(
aid
,
use_label
,
res
):
atlas
=
_atlases
.
get
((
aid
,
use_label
,
res
),
None
)
if
atlas
is
None
:
atlas
=
fslatlases
.
loadAtlas
(
aid
,
loadSummary
=
use_label
,
resolution
=
res
,
indexed
=
True
,
loadData
=
False
,
calcRange
=
False
)
_atlases
[
aid
]
=
atlas
return
atlas
return
fslatlases
.
loadAtlas
(
aid
,
loadSummary
=
use_label
,
resolution
=
res
)
_zero_masks
=
{}
...
...
@@ -219,6 +207,8 @@ def _eval_coord_voxel_query(
# all label atlases have an entry for 0
if
q_in
==
'
in
'
or
(
q_in
==
'
zero
'
and
not
prob
):
explabel
=
int
(
explabel
)
if
prob
:
labelobj
=
a_img
.
desc
.
labels
[
explabel
-
1
]
else
:
labelobj
=
a_img
.
desc
.
labels
[
explabel
]
...
...
@@ -235,6 +225,8 @@ def _eval_coord_voxel_query(
if
q_in
==
'
in
'
or
(
q_in
==
'
zero
'
and
not
prob
):
explabel
=
int
(
explabel
)
if
prob
:
labelobj
=
a_img
.
desc
.
labels
[
explabel
-
1
]
else
:
labelobj
=
a_img
.
desc
.
labels
[
explabel
]
...
...
@@ -244,7 +236,7 @@ def _eval_coord_voxel_query(
exp
=
[
q_type
,
squery
,
'
No label
'
]
_stdout
=
re
.
sub
(
'
\s+
'
,
'
'
,
stdout
).
strip
()
assert
_stdout
==
'
'
.
join
(
exp
)
assert
_stdout
.
strip
()
==
'
'
.
join
(
exp
)
.
strip
()
def
evalProbNormalOutput
(
expprops
):
...
...
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