@@ -27,12 +27,12 @@ class To3DInputSpec(AFNICommandInputSpec):
27
27
argstr = '-prefix %s' , name_source = ["in_folder" , "infolder" ], usedefault = True )
28
28
in_xor = ["infolder" , "in_folder" ]
29
29
in_folder = Directory (desc = 'folder with DICOM images to convert' ,
30
- argstr = '%s/*.dcm' ,
31
- position = - 1 ,
32
- mandatory = True ,
33
- exists = True ,
34
- xor = in_xor )
35
-
30
+ argstr = '%s/*.dcm' ,
31
+ position = - 1 ,
32
+ mandatory = True ,
33
+ exists = True ,
34
+ xor = in_xor )
35
+
36
36
infolder = Directory (desc = 'folder with DICOM images to convert' ,
37
37
argstr = '%s/*.dcm' ,
38
38
position = - 1 ,
@@ -209,36 +209,36 @@ class WarpInputSpec(AFNICommandInputSpec):
209
209
in_file = File (desc = 'input file to 3dWarp' ,
210
210
argstr = '%s' ,
211
211
position = - 1 ,
212
- mandatory = True ,
213
- exists = True )
212
+ mandatory = True ,
213
+ exists = True )
214
214
215
215
out_file = File ("%s_warp" , desc = 'output image file name' ,
216
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
216
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
217
217
218
218
tta2mni = traits .Bool (desc = 'transform dataset from Talairach to MNI152' ,
219
- argstr = '-tta2mni' )
219
+ argstr = '-tta2mni' )
220
220
221
221
mni2tta = traits .Bool (desc = 'transform dataset from MNI152 to Talaraich' ,
222
- argstr = '-mni2tta' )
222
+ argstr = '-mni2tta' )
223
223
224
224
matparent = File (desc = "apply transformation from 3dWarpDrive" ,
225
- argstr = "-matparent %s" ,
226
- exists = True )
225
+ argstr = "-matparent %s" ,
226
+ exists = True )
227
227
228
228
deoblique = traits .Bool (desc = 'transform dataset from oblique to cardinal' ,
229
- argstr = '-deoblique' )
229
+ argstr = '-deoblique' )
230
230
231
231
interp = traits .Enum (('linear' , 'cubic' , 'NN' , 'quintic' ),
232
- desc = 'spatial interpolation methods [default = linear]' ,
233
- argstr = '-%s' )
232
+ desc = 'spatial interpolation methods [default = linear]' ,
233
+ argstr = '-%s' )
234
234
235
235
gridset = File (desc = "copy grid of specified dataset" ,
236
- argstr = "-gridset %s" ,
237
- exists = True )
236
+ argstr = "-gridset %s" ,
237
+ exists = True )
238
238
239
239
zpad = traits .Int (desc = "pad input dataset with N planes" +
240
- " of zero on all sides." ,
241
- argstr = "-zpad %d" )
240
+ " of zero on all sides." ,
241
+ argstr = "-zpad %d" )
242
242
243
243
suffix = traits .Str ('_warp' , desc = "out_file suffix" , usedefault = True )
244
244
@@ -268,16 +268,16 @@ class Warp(AFNICommand):
268
268
class ResampleInputSpec (AFNICommandInputSpec ):
269
269
270
270
in_file = File (desc = 'input file to 3dresample' ,
271
- argstr = '-inset %s' ,
272
- position = - 1 ,
273
- mandatory = True ,
274
- exists = True )
271
+ argstr = '-inset %s' ,
272
+ position = - 1 ,
273
+ mandatory = True ,
274
+ exists = True )
275
275
276
276
out_file = File ("%s_resample" , desc = 'output image file name' ,
277
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
277
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
278
278
279
279
orientation = traits .Str (desc = 'new orientation code' ,
280
- argstr = '-orient %s' )
280
+ argstr = '-orient %s' )
281
281
282
282
283
283
class Resample (AFNIBaseCommand ):
@@ -300,26 +300,29 @@ class Resample(AFNIBaseCommand):
300
300
_cmd = '3dresample'
301
301
input_spec = ResampleInputSpec
302
302
output_spec = AFNICommandOutputSpec
303
-
303
+
304
+
304
305
class AutoTcorrelateInputSpec (AFNICommandInputSpec ):
305
306
in_file = File (desc = 'timeseries x space (volume or surface) file' ,
306
- argstr = '%s' ,
307
- position = - 1 ,
308
- mandatory = True ,
309
- exists = True )
307
+ argstr = '%s' ,
308
+ position = - 1 ,
309
+ mandatory = True ,
310
+ exists = True )
310
311
311
- polort = traits .Int (desc = 'Remove polynomical trend of order m or -1 for no detrending' ,
312
+ polort = traits .Int (
313
+ desc = 'Remove polynomical trend of order m or -1 for no detrending' ,
312
314
argstr = "-polort %d" )
313
315
eta2 = traits .Bool (desc = 'eta^2 similarity' ,
314
- argstr = "-eta2" )
315
- mask = File (exists = True , desc = "mask of voxels" ,
316
- argstr = "-mask %s" )
317
- mask_only_targets = traits .Bool (desc = "use mask only on targets voxels" ,
318
- argstr = "-mask_only_targets" )
316
+ argstr = "-eta2" )
317
+ mask = File (exists = True , desc = "mask of voxels" ,
318
+ argstr = "-mask %s" )
319
+ mask_only_targets = traits .Bool (desc = "use mask only on targets voxels" ,
320
+ argstr = "-mask_only_targets" )
319
321
320
322
out_file = File ("%s_similarity_matrix.1D" , desc = 'output image file name' ,
321
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
322
-
323
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
324
+
325
+
323
326
class AutoTcorrelate (AFNICommand ):
324
327
"""
325
328
Examples
@@ -334,7 +337,7 @@ class AutoTcorrelate(AFNICommand):
334
337
>>> corr.inputs.mask = 'mask.nii'
335
338
>>> corr.inputs.mask_only_targets = True
336
339
>>> corr.cmdline # doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
337
- '3dAutoTcorrelate -eta2 -mask mask.nii -mask_only_targets -prefix ...my_similarity_matrix.1D -polort -1 functional.nii'
340
+ '3dAutoTcorrelate -eta2 -mask mask.nii -mask_only_targets -prefix ...my_similarity_matrix.1D -polort -1 functional.nii'
338
341
>>> res = corr.run() # doctest: +SKIP
339
342
"""
340
343
input_spec = AutoTcorrelateInputSpec
@@ -346,19 +349,20 @@ def _overload_extension(self, value):
346
349
if ext .lower () not in [".1d" , ".nii.gz" , ".nii" ]:
347
350
ext = ext + ".1D"
348
351
return os .path .join (path , base + ext )
349
-
352
+
350
353
def _gen_filename (self , name ):
351
354
return os .path .abspath (super (AutoTcorrelate , self )._gen_filename (name ))
352
355
356
+
353
357
class TStatInputSpec (AFNICommandInputSpec ):
354
358
in_file = File (desc = 'input file to 3dTstat' ,
355
- argstr = '%s' ,
356
- position = - 1 ,
357
- mandatory = True ,
358
- exists = True )
359
+ argstr = '%s' ,
360
+ position = - 1 ,
361
+ mandatory = True ,
362
+ exists = True )
359
363
360
364
out_file = File ("%s_tstat" , desc = 'output image file name' ,
361
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
365
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
362
366
363
367
364
368
class TStat (AFNICommand ):
@@ -385,13 +389,13 @@ class TStat(AFNICommand):
385
389
386
390
class DetrendInputSpec (AFNICommandInputSpec ):
387
391
in_file = File (desc = 'input file to 3dDetrend' ,
388
- argstr = '%s' ,
389
- position = - 1 ,
390
- mandatory = True ,
391
- exists = True )
392
+ argstr = '%s' ,
393
+ position = - 1 ,
394
+ mandatory = True ,
395
+ exists = True )
392
396
393
397
out_file = File ("%s_detrend" , desc = 'output image file name' ,
394
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
398
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
395
399
396
400
397
401
class Detrend (AFNICommand ):
@@ -419,13 +423,13 @@ class Detrend(AFNICommand):
419
423
420
424
class DespikeInputSpec (AFNICommandInputSpec ):
421
425
in_file = File (desc = 'input file to 3dDespike' ,
422
- argstr = '%s' ,
423
- position = - 1 ,
424
- mandatory = True ,
425
- exists = True )
426
+ argstr = '%s' ,
427
+ position = - 1 ,
428
+ mandatory = True ,
429
+ exists = True )
426
430
427
431
out_file = File ("%s_despike" , desc = 'output image file name' ,
428
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
432
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
429
433
430
434
431
435
class Despike (AFNICommand ):
@@ -451,13 +455,13 @@ class Despike(AFNICommand):
451
455
452
456
class AutomaskInputSpec (AFNICommandInputSpec ):
453
457
in_file = File (desc = 'input file to 3dAutomask' ,
454
- argstr = '%s' ,
455
- position = - 1 ,
456
- mandatory = True ,
457
- exists = True )
458
+ argstr = '%s' ,
459
+ position = - 1 ,
460
+ mandatory = True ,
461
+ exists = True )
458
462
459
463
out_file = File ("%s_mask" , desc = 'output image file name' ,
460
- argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
464
+ argstr = '-prefix %s' , name_source = "in_file" , usedefault = True )
461
465
462
466
brain_file = File ("%s_masked" ,
463
467
desc = "output file from 3dAutomask" ,
0 commit comments