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

Single char arguments require special handling here

Also fix betfparam and strongbias arguments
parent aafd587e
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ def fsl_anat(img, out='fsl_anat', **kwargs):
asrt.assertIsNifti(img)
valmap = {
'strongbias' : wutils.SHOW_IF_TRUE,
'weakbias' : wutils.SHOW_IF_TRUE,
'noreorient' : wutils.SHOW_IF_TRUE,
'nocrop' : wutils.SHOW_IF_TRUE,
......@@ -33,16 +34,18 @@ def fsl_anat(img, out='fsl_anat', **kwargs):
'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]
img_type = kwargs.pop("img_type", "T1")
cmd = ['fsl_anat', '-i', img, '-o', out, '-t', img_type]
smoothing = kwargs.pop("bias_smoothing", None)
if smoothing is not None:
cmd += ['-s', str(smoothing)]
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