@@ -1513,7 +1513,7 @@ class WarpUtilsInputSpec(FSLCommandInputSpec):
1513
1513
'would typically be the file that was specified '
1514
1514
'with the --in argument when running fnirt.' ))
1515
1515
1516
- out_format = traits .Either ('field ' , 'spline ' , argstr = '--outformat=%s' ,
1516
+ out_format = traits .Either ('spline ' , 'field ' , argstr = '--outformat=%s' ,
1517
1517
desc = ('Specifies the output format. If set to field (default) '
1518
1518
'the output will be a (4D) field-file. If set to spline '
1519
1519
'the format will be a (4D) file of spline coefficients.' ))
@@ -1557,10 +1557,8 @@ class WarpUtilsInputSpec(FSLCommandInputSpec):
1557
1557
'stored separately from the displacements).' ))
1558
1558
1559
1559
class 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 '
1564
1562
'the Jacobian' ))
1565
1563
1566
1564
@@ -1603,9 +1601,12 @@ def _parse_inputs(self, skip=None):
1603
1601
1604
1602
if self .inputs .write_jacobian :
1605
1603
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' ]
1609
1610
1610
1611
skip += ['write_jacobian' ]
1611
1612
return super (WarpUtils , self )._parse_inputs (skip = skip )
0 commit comments