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
6e91d3fb
Commit
6e91d3fb
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
RF: Handle -t/-K for 3D images/single label
parent
b8a733e9
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/wrappers/fslstats.py
+5
-5
5 additions, 5 deletions
fsl/wrappers/fslstats.py
with
5 additions
and
5 deletions
fsl/wrappers/fslstats.py
+
5
−
5
View file @
6e91d3fb
...
@@ -95,9 +95,9 @@ class fslstats(object):
...
@@ -95,9 +95,9 @@ class fslstats(object):
The ``fslstats`` command can be executed via the :meth:`run` method.
The ``fslstats`` command can be executed via the :meth:`run` method.
Normally, the results will be returned as a
list of
floating point
Normally, the results will be returned as a
scalar
floating point
number,
numbers
. Pre-options will affect the structure of the return
value - see
or a ``numpy`` array
. Pre-options will affect the structure of the return
:meth:`__init__` for details.
value - see
:meth:`__init__` for details.
Attribute and method calls can be chained together, so a complete
Attribute and method calls can be chained together, so a complete
...
@@ -162,7 +162,7 @@ class fslstats(object):
...
@@ -162,7 +162,7 @@ class fslstats(object):
def
__getattr__
(
self
,
name
):
def
__getattr__
(
self
,
name
):
"""
Intercepts attribute accesses and
stag
es ``fslstats`` command-line
"""
Intercepts attribute accesses and
accumulat
es ``fslstats`` command-line
flags accordingly.
flags accordingly.
"""
"""
...
@@ -238,7 +238,7 @@ class fslstats(object):
...
@@ -238,7 +238,7 @@ class fslstats(object):
# reshape the result into
# reshape the result into
# (nvals, nvols, nlbls)
# (nvals, nvols, nlbls)
nlbls
=
int
(
len
(
result
)
/
nvols
)
nlbls
=
int
(
len
(
result
)
/
nvols
)
result
=
result
.
reshape
((
nvols
,
nlbls
,
-
1
))
result
=
result
.
reshape
((
nvols
,
nlbls
,
-
1
))
.
squeeze
()
# Scalar - use numpy indexing weirdness
# Scalar - use numpy indexing weirdness
# to get our single value out.
# to get our single value out.
...
...
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