@@ -1513,7 +1513,7 @@ class WarpUtilsInputSpec(FSLCommandInputSpec):
15131513 'would typically be the file that was specified '
15141514 'with the --in argument when running fnirt.' ))
15151515
1516- out_format = traits .Either ('field ' , 'spline ' , argstr = '--outformat=%s' ,
1516+ out_format = traits .Either ('spline ' , 'field ' , argstr = '--outformat=%s' ,
15171517 desc = ('Specifies the output format. If set to field (default) '
15181518 'the output will be a (4D) field-file. If set to spline '
15191519 'the format will be a (4D) file of spline coefficients.' ))
@@ -1557,10 +1557,8 @@ class WarpUtilsInputSpec(FSLCommandInputSpec):
15571557 'stored separately from the displacements).' ))
15581558
15591559class WarpUtilsOutputSpec (TraitedSpec ):
1560- out_file = File (exists = True ,
1561- desc = ('Name of output file, containing the warp as field or coefficients.' ))
1562- out_jacobian = File (exists = True ,
1563- desc = ('Name of output file, containing the map of the determinant of '
1560+ out_file = File (desc = ('Name of output file, containing the warp as field or coefficients.' ))
1561+ out_jacobian = File (desc = ('Name of output file, containing the map of the determinant of '
15641562 'the Jacobian' ))
15651563
15661564
@@ -1603,9 +1601,12 @@ def _parse_inputs(self, skip=None):
16031601
16041602 if self .inputs .write_jacobian :
16051603 if not isdefined (self .inputs .out_jacobian ):
1606- trait_spec = self .inputs .trait ('out_jacobian' )
1607- trait_spec .name_source = ['in_file' ]
1608- trait_spec .name_template = '%s_jac'
1604+ jac_spec = self .inputs .trait ('out_jacobian' )
1605+ jac_spec .name_source = ['in_file' ]
1606+ jac_spec .name_template = '%s_jac'
1607+ jac_spec .output_name = 'out_jacobian'
1608+ else :
1609+ skip += ['out_jacobian' ]
16091610
16101611 skip += ['write_jacobian' ]
16111612 return super (WarpUtils , self )._parse_inputs (skip = skip )
0 commit comments