@@ -507,20 +507,12 @@ class AutomaskInputSpec(AFNICommandInputSpec):
507
507
erode = traits .Int (desc = 'erode the mask inwards' ,
508
508
argstr = "-erode %s" )
509
509
510
- mask_suffix = traits .Str (
511
- desc = "out_file suffix" , depracated = 0.8 , new_name = "out_file" )
512
- apply_suffix = traits .Str (
513
- desc = "out_file suffix" , depracated = 0.8 , new_name = "brain_file" )
514
- apply_mask = File (desc = "output file from 3dAutomask" ,
515
- argstr = '-apply_prefix %s' ,
516
- name_source = "in_file" , depracated = 0.8 , new_name = "brain_file" )
517
-
518
510
519
511
class AutomaskOutputSpec (TraitedSpec ):
520
512
out_file = File (desc = 'mask file' ,
521
513
exists = True )
522
514
523
- brain_file = File (desc = 'brain file (skull stripped)' )
515
+ brain_file = File (desc = 'brain file (skull stripped)' , exists = True )
524
516
525
517
526
518
class Automask (AFNICommand ):
@@ -547,46 +539,6 @@ class Automask(AFNICommand):
547
539
input_spec = AutomaskInputSpec
548
540
output_spec = AutomaskOutputSpec
549
541
550
- def _gen_filename (self , name ):
551
- trait_spec = self .inputs .trait (name )
552
- if name == "out_file" and isdefined (self .inputs .mask_suffix ):
553
- suffix = ''
554
- prefix = ''
555
- if isdefined (self .inputs .mask_suffix ):
556
- suffix = self .inputs .suffix
557
-
558
- _ , base , _ = split_filename (
559
- getattr (self .inputs , trait_spec .name_source ))
560
- return self ._gen_fname (basename = base , prefix = prefix , suffix = suffix , cwd = os .getcwd ())
561
- elif name == "brain_file" and isdefined (self .inputs .apply_suffix ):
562
- suffix = ''
563
- prefix = ''
564
- if isdefined (self .inputs .apply_suffix ):
565
- suffix = self .inputs .suffix
566
-
567
- _ , base , _ = split_filename (
568
- getattr (self .inputs , trait_spec .name_source ))
569
- return self ._gen_fname (basename = base , prefix = prefix , suffix = suffix , cwd = os .getcwd ())
570
- elif name == "apply_mask" and isdefined (self .inputs .apply_suffix ):
571
- suffix = ''
572
- prefix = ''
573
- if isdefined (self .inputs .apply_suffix ):
574
- suffix = self .inputs .suffix
575
-
576
- _ , base , _ = split_filename (
577
- getattr (self .inputs , trait_spec .name_source ))
578
- return self ._gen_fname (basename = base , prefix = prefix , suffix = suffix , cwd = os .getcwd ())
579
- elif hasattr (self .inputs , name ) and isdefined (getattr (self .inputs , name )):
580
- return super (Automask , self )._gen_filename (name )
581
- return Undefined
582
-
583
- def _list_outputs (self ):
584
- outputs = super (Automask , self )._list_outputs ()
585
- if isdefined (self .inputs .apply_mask ):
586
- outputs ['brain_file' ] = os .path .abspath (
587
- self ._gen_filename ('apply_mask' ))
588
- return outputs
589
-
590
542
591
543
class VolregInputSpec (AFNICommandInputSpec ):
592
544
0 commit comments