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

Special case to handle 'centre' argument for BET since this needs to be

passed as a sequence of CL arguments, not a single value
parent 412dba34
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ def bet(input, output, **kwargs): ...@@ -35,6 +35,7 @@ def bet(input, output, **kwargs):
'robust' : 'R', 'robust' : 'R',
'fracintensity' : 'f', 'fracintensity' : 'f',
'seg' : 'n', 'seg' : 'n',
'centre' : 'c',
} }
valmap = { valmap = {
...@@ -55,6 +56,14 @@ def bet(input, output, **kwargs): ...@@ -55,6 +56,14 @@ def bet(input, output, **kwargs):
} }
cmd = ['bet', input, output] cmd = ['bet', input, output]
# The 'centre' argument requires three co-ordinates and can't be passed
# as a single value, so needs to be handled separately. Assume it is
# passed as a Python sequence
centre = kwargs.pop("c", None)
if centre is not None:
cmd += ['c', ] + list(centre)
cmd += wutils.applyArgStyle('-', argmap=argmap, valmap=valmap, **kwargs) cmd += wutils.applyArgStyle('-', argmap=argmap, valmap=valmap, **kwargs)
return cmd 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