7
7
import os .path as op
8
8
9
9
from ..base import (CommandLineInputSpec , CommandLine , traits , TraitedSpec ,
10
- File , isdefined , Undefined )
10
+ File , isdefined , Undefined , InputMultiObject )
11
11
from .base import MRTrix3BaseInputSpec , MRTrix3Base
12
12
13
13
@@ -40,10 +40,14 @@ class ResponseSDInputSpec(MRTrix3BaseInputSpec):
40
40
argstr = '%s' , position = - 1 , desc = 'output CSF response text file' )
41
41
in_mask = File (
42
42
exists = True , argstr = '-mask %s' , desc = 'provide initial mask image' )
43
- max_sh = traits .Int (
44
- 8 , usedefault = True ,
45
- argstr = '-lmax %d' ,
46
- desc = 'maximum harmonic degree of response function' )
43
+ max_sh = InputMultiObject (
44
+ traits .Int ,
45
+ value = [8 ],
46
+ usedefault = True ,
47
+ argstr = '-lmax %s' ,
48
+ sep = ',' ,
49
+ desc = ('maximum harmonic degree of response function - single value for '
50
+ 'single-shell response, list for multi-shell response' ))
47
51
48
52
49
53
class ResponseSDOutputSpec (TraitedSpec ):
@@ -67,6 +71,11 @@ class ResponseSD(MRTrix3Base):
67
71
>>> resp.cmdline # doctest: +ELLIPSIS
68
72
'dwi2response tournier -fslgrad bvecs bvals -lmax 8 dwi.mif wm.txt'
69
73
>>> resp.run() # doctest: +SKIP
74
+
75
+ # We can also pass in multiple harmonic degrees in the case of multi-shell
76
+ >>> resp.inputs.max_sh = [6,8,10]
77
+ >>> resp.cmdline
78
+ 'dwi2response tournier -fslgrad bvecs bvals -lmax 6,8,10 dwi.mif wm.txt'
70
79
"""
71
80
72
81
_cmd = 'dwi2response'
0 commit comments