@@ -220,6 +220,10 @@ class Dcm2niixInputSpec(CommandLineInputSpec):
220
220
desc = "Convert only one image (filename as last input" )
221
221
verbose = traits .Bool (False , argstr = '-v' , usedefault = True ,
222
222
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" )
223
227
224
228
225
229
class Dcm2niixOutputSpec (TraitedSpec ):
@@ -240,15 +244,16 @@ class Dcm2niix(CommandLine):
240
244
>>> converter.inputs.single_file = True
241
245
>>> converter.inputs.output_dir = '.'
242
246
>>> 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'
244
248
"""
245
249
246
250
input_spec = Dcm2niixInputSpec
247
251
output_spec = Dcm2niixOutputSpec
248
252
_cmd = 'dcm2niix'
249
253
250
254
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' ]:
252
257
spec = deepcopy (spec )
253
258
if val :
254
259
spec .argstr += ' y'
@@ -299,7 +304,7 @@ def _parse_stdout(self, stdout):
299
304
if out_file :
300
305
files .append (out_file + ".nii.gz" )
301
306
if self .inputs .bids_format :
302
- bids .append (out_file + ".bids " )
307
+ bids .append (out_file + ".json " )
303
308
continue
304
309
skip = False
305
310
# just return what was done
0 commit comments