@@ -3099,13 +3099,21 @@ class BestLinRegInputSpec(CommandLineInputSpec):
3099
3099
desc = 'output xfm file' ,
3100
3100
genfile = True ,
3101
3101
argstr = '%s' ,
3102
- position = - 2 ,)
3102
+ position = - 2 ,
3103
+ name_source = ['source' ],
3104
+ hash_files = False ,
3105
+ name_template = '%s_bestlinreg.xfm' ,
3106
+ keep_extension = False )
3103
3107
3104
3108
output_mnc = File (
3105
3109
desc = 'output mnc file' ,
3106
3110
genfile = True ,
3107
3111
argstr = '%s' ,
3108
- position = - 1 ,)
3112
+ position = - 1 ,
3113
+ name_source = ['source' ],
3114
+ hash_files = False ,
3115
+ name_template = '%s_bestlinreg.mnc' ,
3116
+ keep_extension = False )
3109
3117
3110
3118
verbose = traits .Bool (
3111
3119
desc = 'Print out log messages. Default: False.' ,
@@ -3155,42 +3163,6 @@ class BestLinReg(CommandLine):
3155
3163
output_spec = BestLinRegOutputSpec
3156
3164
_cmd = 'bestlinreg'
3157
3165
3158
- def _gen_filename (self , name ):
3159
- if name == 'output_mnc' :
3160
- output_mnc = self .inputs .output_mnc
3161
-
3162
- if isdefined (output_mnc ):
3163
- return os .path .abspath (output_mnc )
3164
- else :
3165
- return aggregate_filename (
3166
- [self .inputs .source , self .inputs .target ], 'bestlinreg_output' )
3167
- elif name == 'output_xfm' :
3168
- output_xfm = self .inputs .output_xfm
3169
-
3170
- if isdefined (output_xfm ):
3171
- return os .path .abspath (output_xfm )
3172
- else :
3173
- return aggregate_filename (
3174
- [
3175
- self .inputs .source ,
3176
- self .inputs .target ],
3177
- 'bestlinreg_output' ) + 'output_xfm.xfm' # FIXME, tidy up
3178
- else :
3179
- raise NotImplemented
3180
-
3181
- def _list_outputs (self ):
3182
- outputs = self .output_spec ().get ()
3183
- outputs ['output_mnc' ] = os .path .abspath (
3184
- self ._gen_filename ('output_mnc' ))
3185
- outputs ['output_xfm' ] = os .path .abspath (
3186
- self ._gen_filename ('output_xfm' ))
3187
- return outputs
3188
-
3189
-
3190
- """
3191
- "$isomodel_base.mnc", $fitfiles[$f], $modxfm[$f]);
3192
- """
3193
-
3194
3166
3195
3167
class NlpFitInputSpec (CommandLineInputSpec ):
3196
3168
source = File (
0 commit comments