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
7c72afde
Commit
7c72afde
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
BF: Handle present but empty elements
parent
e3f6c86f
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/atlases.py
+13
-22
13 additions, 22 deletions
fsl/data/atlases.py
with
13 additions
and
22 deletions
fsl/data/atlases.py
+
13
−
22
View file @
7c72afde
...
...
@@ -521,28 +521,19 @@ class AtlasDescription(object):
if
self
.
atlasType
==
'
statistic
'
:
statistic
=
header
.
find
(
'
statistic
'
)
units
=
header
.
find
(
'
units
'
)
lower
=
header
.
find
(
'
lower
'
)
upper
=
header
.
find
(
'
upper
'
)
precision
=
header
.
find
(
'
precision
'
)
if
statistic
is
None
:
statistic
=
''
else
:
statistic
=
statistic
.
text
.
strip
()
if
units
is
None
:
units
=
''
else
:
units
=
units
.
text
.
strip
()
if
lower
is
None
:
lower
=
0
else
:
lower
=
float
(
lower
.
text
.
strip
())
if
upper
is
None
:
upper
=
100
else
:
upper
=
float
(
upper
.
text
.
strip
())
if
precision
is
None
:
precision
=
2
else
:
precision
=
float
(
precision
.
text
.
strip
())
self
.
statistic
=
statistic
self
.
units
=
units
self
.
lower
=
lower
self
.
upper
=
upper
self
.
precision
=
precision
fields
=
[
'
statistic
'
,
'
units
'
,
'
lower
'
,
'
upper
'
,
'
precision
'
]
values
=
{}
for
field
in
fields
:
elem
=
header
.
find
(
field
)
if
elem
is
not
None
and
elem
.
text
is
not
None
:
values
[
field
]
=
elem
.
text
.
strip
()
self
.
statistic
=
values
.
get
(
'
statistic
'
,
''
)
self
.
units
=
values
.
get
(
'
units
'
,
''
)
self
.
lower
=
float
(
values
.
get
(
'
lower
'
,
0
))
self
.
upper
=
float
(
values
.
get
(
'
upper
'
,
100
))
self
.
precision
=
int
(
values
.
get
(
'
precision
'
,
2
))
elif
self
.
atlasType
==
'
probabilistic
'
:
self
.
statistic
=
''
...
...
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