@@ -382,33 +382,47 @@ def _gen_filename(self, name):
382
382
return self ._list_outputs ()[name ]
383
383
return None
384
384
385
+
385
386
class Surface2VolTransformInputSpec (FSTraitedSpec ):
386
387
source_file = File (exists = True , argstr = '--surfval %s' ,
387
388
copyfile = False , mandatory = True ,
388
389
desc = 'This is the source of the surface values' )
389
- hemi = traits .Str (argstr = '--hemi %s' , mandatory = True , desc = 'hemisphere of data' )
390
- transformed_file = File (name_template = "%s_asVol.nii" , desc = 'Output volume' , argstr = '--outvol %s' ,
390
+ hemi = traits .Str (argstr = '--hemi %s' , mandatory = True ,
391
+ desc = 'hemisphere of data' )
392
+ transformed_file = File (name_template = "%s_asVol.nii" , desc = 'Output volume' ,
393
+ argstr = '--outvol %s' ,
391
394
name_source = ['source_file' ], hash_files = False )
392
395
reg_file = File (exists = True , argstr = '--volreg %s' ,
393
396
mandatory = True ,
394
397
desc = 'tkRAS-to-tkRAS matrix (tkregister2 format)' ,
395
398
xor = ['subject_id' ])
396
399
template_file = File (exists = True , argstr = '--template %s' ,
397
400
desc = 'Output template volume' )
398
- mkmask = traits .Bool (desc = 'make a mask instead of loading surface values' , argstr = '--mkmask' )
399
- vertexvol_file = File (name_template = "%s_asVol_vertex.nii" , desc = 'Path name of the vertex output '
400
- 'volume, which is the same as output volume except that the value of each '
401
- 'voxel is the vertex-id that is mapped to that voxel.' ,
402
- argstr = '--vtxvol %s' , name_source = ['source_file' ], hash_files = False )
403
- surf_name = traits .Str (exists = True , argstr = '--surf %s' ,desc = 'surfname (default is white)' )
404
- projfrac = traits .Float (exists = True , argstr = '--projfrac %s' ,desc = 'thickness fraction' )
405
- subjects_dir = traits .Str (argstr = '--sd %s' ,desc = 'freesurfer subjects directory defaults to $SUBJECTS_DIR' )
406
- subject_id = traits .Str (argstr = '--identity %s' ,desc = 'subject id' , xor = ['reg_file' ])
401
+ mkmask = traits .Bool (desc = 'make a mask instead of loading surface values' ,
402
+ argstr = '--mkmask' )
403
+ vertexvol_file = File (name_template = "%s_asVol_vertex.nii" ,
404
+ desc = ('Path name of the vertex output volume, which '
405
+ 'is the same as output volume except that the '
406
+ 'value of each voxel is the vertex-id that is '
407
+ 'mapped to that voxel.' ),
408
+ argstr = '--vtxvol %s' , name_source = ['source_file' ],
409
+ hash_files = False )
410
+ surf_name = traits .Str (argstr = '--surf %s' ,
411
+ desc = 'surfname (default is white)' )
412
+ projfrac = traits .Float (argstr = '--projfrac %s' , desc = 'thickness fraction' )
413
+ subjects_dir = traits .Str (argstr = '--sd %s' ,
414
+ desc = ('freesurfer subjects directory defaults to '
415
+ '$SUBJECTS_DIR' ))
416
+ subject_id = traits .Str (argstr = '--identity %s' ,desc = 'subject id' ,
417
+ xor = ['reg_file' ])
418
+
407
419
408
420
class Surface2VolTransformOutputSpec (TraitedSpec ):
409
- transformed_file = File (exists = True , desc = 'Path to output file if used normally' )
421
+ transformed_file = File (exists = True ,
422
+ desc = 'Path to output file if used normally' )
410
423
vertexvol_file = File (desc = 'vertex map volume path id. Optional' )
411
424
425
+
412
426
class Surface2VolTransform (FSCommand ):
413
427
"""Use FreeSurfer mri_surf2vol to apply a transform.
414
428
@@ -432,6 +446,7 @@ class Surface2VolTransform(FSCommand):
432
446
input_spec = Surface2VolTransformInputSpec
433
447
output_spec = Surface2VolTransformOutputSpec
434
448
449
+
435
450
class ApplyMaskInputSpec (FSTraitedSpec ):
436
451
437
452
in_file = File (exists = True , mandatory = True , position = - 3 , argstr = "%s" ,
0 commit comments