Commit e90cfffc authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

ENH: New wrapper for fast

parent 45742245
......@@ -81,6 +81,7 @@ from .bet import (bet, # noqa
from .eddy import (eddy_cuda, # noqa
from .fast import (fast,) # noqa
from .flirt import (flirt, # noqa
#!/usr/bin/env python
# - Wrapper for the FSL fast command.
# Author: Martin Craig <>
# Paul McCarthy <>
"""This module provides the :func:`fast` function, a wrapper for the FSL
`FAST <>`_ command.
import six
import fsl.utils.assertions as asrt
from . import wrapperutils as wutils
@wutils.fileOrImage('imgs', 'A', 's', 'manualseg', outprefix='out')
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:
argmap = {
'n_classes' : 'class',
cmd = ['fast', '-v', '--out=%s' % out]
cmd += wutils.applyArgStyle('--=', argmap=argmap, **kwargs)
cmd += imgs
return cmd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment