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
e90cfffc
Commit
e90cfffc
authored
6 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
ENH: New wrapper for fast
parent
45742245
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fsl/wrappers/__init__.py
+1
-0
1 addition, 0 deletions
fsl/wrappers/__init__.py
fsl/wrappers/fast.py
+45
-0
45 additions, 0 deletions
fsl/wrappers/fast.py
with
46 additions
and
0 deletions
fsl/wrappers/__init__.py
+
1
−
0
View file @
e90cfffc
...
...
@@ -81,6 +81,7 @@ from .bet import (bet, # noqa
robustfov
)
from
.eddy
import
(
eddy_cuda
,
# noqa
topup
)
from
.fast
import
(
fast
,)
# noqa
from
.flirt
import
(
flirt
,
# noqa
invxfm
,
applyxfm
,
...
...
This diff is collapsed.
Click to expand it.
fsl/wrappers/fast.py
0 → 100644
+
45
−
0
View file @
e90cfffc
#!/usr/bin/env python
#
# fast.py - Wrapper for the FSL fast command.
#
# Author: Martin Craig <martin.craig@eng.ox.ac.uk>
# Paul McCarthy <pauldmccarthy@gmail.com>
#
"""
This module provides the :func:`fast` function, a wrapper for the FSL
`FAST <https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FAST>`_ command.
"""
import
six
import
fsl.utils.assertions
as
asrt
from
.
import
wrapperutils
as
wutils
@wutils.fileOrImage
(
'
imgs
'
,
'
A
'
,
'
s
'
,
'
manualseg
'
,
outprefix
=
'
out
'
)
@wutils.fileOrArray
(
'
a
'
)
@wutils.fslwrapper
def
fast
(
imgs
,
out
=
"
fast
"
,
**
kwargs
):
"""
Wrapper for the ``fast`` command.
:arg imgs: Input image(s)
:arg out: Output basename
:arg n_classes: Number of tissue classes (corresponds to the ``--class``
command line option)
"""
if
isinstance
(
imgs
,
six
.
string_types
):
imgs
=
[
imgs
]
for
i
in
imgs
:
asrt
.
assertIsNifti
(
imgs
)
argmap
=
{
'
n_classes
'
:
'
class
'
,
}
cmd
=
[
'
fast
'
,
'
-v
'
,
'
--out=%s
'
%
out
]
cmd
+=
wutils
.
applyArgStyle
(
'
--=
'
,
argmap
=
argmap
,
**
kwargs
)
cmd
+=
imgs
return
cmd
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