Skip to content
Snippets Groups Projects
Commit aafd587e authored by Martin Craig's avatar Martin Craig
Browse files

Add FSL_ANAT wrapper

parent 11951148
No related branches found
No related tags found
No related merge requests found
...@@ -82,6 +82,7 @@ from .bet import (bet, # noqa ...@@ -82,6 +82,7 @@ from .bet import (bet, # noqa
from .eddy import (eddy_cuda, # noqa from .eddy import (eddy_cuda, # noqa
topup) topup)
from .fast import (fast,) # noqa from .fast import (fast,) # noqa
from .fsl_anat import (fsl_anat,) # noqa
from .flirt import (flirt, # noqa from .flirt import (flirt, # noqa
invxfm, invxfm,
applyxfm, applyxfm,
......
#!/usr/bin/env python
#
# fsl_anat.py - Wrapper for the FSL_ANAT command.
#
# Author: Martin Craig <martin.craig@eng.ox.ac.uk>
#
"""This module provides the :func:`fsl_anat` function, a wrapper for the FSL
`FSL_ANAT <https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/fsl_anat>`_ command.
"""
import six
import fsl.utils.assertions as asrt
from . import wrapperutils as wutils
@wutils.fileOrImage('img', outprefix='out')
@wutils.fslwrapper
def fsl_anat(img, out='fsl_anat', **kwargs):
"""Wrapper for the ``fsl_anat`` command.
:arg img: Input structural image
:arg out: Output directory name
"""
asrt.assertIsNifti(img)
valmap = {
'weakbias' : wutils.SHOW_IF_TRUE,
'noreorient' : wutils.SHOW_IF_TRUE,
'nocrop' : wutils.SHOW_IF_TRUE,
'nobias' : wutils.SHOW_IF_TRUE,
'noreg' : wutils.SHOW_IF_TRUE,
'nononlinreg' : wutils.SHOW_IF_TRUE,
'noseg' : wutils.SHOW_IF_TRUE,
'nosubcortseg' : wutils.SHOW_IF_TRUE,
'nosearch' : wutils.SHOW_IF_TRUE,
'betfparam' : wutils.SHOW_IF_TRUE,
'nocleanup' : wutils.SHOW_IF_TRUE,
}
argmap = {
'bias_smoothing' : 's',
'img_type' : 't',
}
cmd = ['fsl_anat', '-i', img, '-o', out]
cmd += wutils.applyArgStyle('--=', valmap=valmap, argmap=argmap, singlechar_args=True, **kwargs)
return cmd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment