@@ -2603,12 +2603,17 @@ class NormInputSpec(CommandLineInputSpec):
2603
2603
desc = 'output file' ,
2604
2604
genfile = True ,
2605
2605
argstr = '%s' ,
2606
- position = - 1 ,)
2606
+ position = - 1 ,
2607
+ name_source = ['input_file' ],
2608
+ hash_files = False ,
2609
+ name_template = '%s_norm.mnc' )
2607
2610
2608
2611
output_threshold_mask = traits .File (
2609
2612
desc = 'File in which to store the threshold mask.' ,
2610
2613
argstr = '-threshold_mask %s' ,
2611
- genfile = True )
2614
+ name_source = ['input_file' ],
2615
+ hash_files = False ,
2616
+ name_template = '%s_norm_threshold_mask.mnc' )
2612
2617
2613
2618
clobber = traits .Bool (
2614
2619
desc = 'Overwrite existing file.' ,
@@ -2686,36 +2691,6 @@ class Norm(CommandLine):
2686
2691
output_spec = NormOutputSpec
2687
2692
_cmd = 'mincnorm'
2688
2693
2689
- def _gen_filename (self , name ):
2690
- if name == 'output_file' :
2691
- output_file = self .inputs .output_file
2692
-
2693
- if isdefined (output_file ):
2694
- return os .path .abspath (output_file )
2695
- else :
2696
- return aggregate_filename (
2697
- [self .inputs .input_file ], 'norm_output' )
2698
- elif name == 'output_threshold_mask' :
2699
- output_threshold_mask = self .inputs .output_threshold_mask
2700
-
2701
- if isdefined (output_threshold_mask ):
2702
- return os .path .abspath (output_threshold_mask )
2703
- else :
2704
- return aggregate_filename (
2705
- [self .inputs .input_file ], 'norm_output_threshold_mask' )
2706
- else :
2707
- raise NotImplemented
2708
-
2709
- def _gen_outfilename (self ):
2710
- return self ._gen_filename ('output_file' )
2711
-
2712
- def _list_outputs (self ):
2713
- outputs = self .output_spec ().get ()
2714
- outputs ['output_file' ] = os .path .abspath (self ._gen_outfilename ())
2715
- outputs ['output_threshold_mask' ] = self ._gen_filename (
2716
- 'output_threshold_mask' )
2717
- return outputs
2718
-
2719
2694
2720
2695
"""
2721
2696
| volcentre will centre a MINC image's sampling about a point (0,0,0 typically)
0 commit comments