Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
6e91d3fb
Commit
6e91d3fb
authored
Mar 27, 2020
by
Paul McCarthy
🚵
Browse files
RF: Handle -t/-K for 3D images/single label
parent
b8a733e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl/wrappers/fslstats.py
View file @
6e91d3fb
...
...
@@ -95,9 +95,9 @@ class fslstats(object):
The ``fslstats`` command can be executed via the :meth:`run` method.
Normally, the results will be returned as a
list of
floating point
numbers
. Pre-options will affect the structure of the return
value - see
:meth:`__init__` for details.
Normally, the results will be returned as a
scalar
floating point
number,
or a ``numpy`` array
. Pre-options will affect the structure of the return
value - see
:meth:`__init__` for details.
Attribute and method calls can be chained together, so a complete
...
...
@@ -162,7 +162,7 @@ class fslstats(object):
def
__getattr__
(
self
,
name
):
"""Intercepts attribute accesses and
stag
es ``fslstats`` command-line
"""Intercepts attribute accesses and
accumulat
es ``fslstats`` command-line
flags accordingly.
"""
...
...
@@ -238,7 +238,7 @@ class fslstats(object):
# reshape the result into
# (nvals, nvols, nlbls)
nlbls
=
int
(
len
(
result
)
/
nvols
)
result
=
result
.
reshape
((
nvols
,
nlbls
,
-
1
))
result
=
result
.
reshape
((
nvols
,
nlbls
,
-
1
))
.
squeeze
()
# Scalar - use numpy indexing weirdness
# to get our single value out.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment