77import os .path as op
88
99from ..base import (CommandLineInputSpec , CommandLine , traits , TraitedSpec ,
10- File , isdefined , Undefined )
10+ File , isdefined , Undefined , InputMultiObject )
1111from .base import MRTrix3BaseInputSpec , MRTrix3Base
1212
1313
@@ -40,10 +40,14 @@ class ResponseSDInputSpec(MRTrix3BaseInputSpec):
4040 argstr = '%s' , position = - 1 , desc = 'output CSF response text file' )
4141 in_mask = File (
4242 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' ))
4751
4852
4953class ResponseSDOutputSpec (TraitedSpec ):
@@ -67,6 +71,11 @@ class ResponseSD(MRTrix3Base):
6771 >>> resp.cmdline # doctest: +ELLIPSIS
6872 'dwi2response tournier -fslgrad bvecs bvals -lmax 8 dwi.mif wm.txt'
6973 >>> 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'
7079 """
7180
7281 _cmd = 'dwi2response'
0 commit comments