@@ -220,6 +220,10 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
220220 desc = "Convert only one image (filename as last input" )
221221 verbose = traits .Bool (False , argstr = '-v' , usedefault = True ,
222222 desc = "Verbose output" )
223+ crop = traits .Bool (False , argstr = '-x' , usedefault = True ,
224+ desc = "Crop 3D T1 acquisitions" )
225+ has_private = traits .Bool (False , argstr = '-t' , usedefault = True ,
226+ desc = "Flag if text notes includes private patient details" )
223227
224228
225229class Dcm2niixOutputSpec (TraitedSpec ):
@@ -240,15 +244,16 @@ class Dcm2niix(CommandLine):
240244 >>> converter.inputs.single_file = True
241245 >>> converter.inputs.output_dir = '.'
242246 >>> converter.cmdline
243- 'dcm2niix -b y -z i -m n -f %t%p -o . -s y -v n functional_1.dcm'
247+ 'dcm2niix -b y -z i -m n -f %t%p -o . -s y -v n -x n -t n functional_1.dcm'
244248 """
245249
246250 input_spec = Dcm2niixInputSpec
247251 output_spec = Dcm2niixOutputSpec
248252 _cmd = 'dcm2niix'
249253
250254 def _format_arg (self , opt , spec , val ):
251- if opt in ['bids_format' , 'merge_imgs' , 'single_file' , 'verbose' ]:
255+ if opt in ['bids_format' , 'merge_imgs' , 'single_file' , 'verbose' , 'crop' ,
256+ 'has_private' ]:
252257 spec = deepcopy (spec )
253258 if val :
254259 spec .argstr += ' y'
@@ -299,7 +304,7 @@ def _parse_stdout(self, stdout):
299304 if out_file :
300305 files .append (out_file + ".nii.gz" )
301306 if self .inputs .bids_format :
302- bids .append (out_file + ".bids " )
307+ bids .append (out_file + ".json " )
303308 continue
304309 skip = False
305310 # just return what was done
0 commit comments