Skip to content

Commit 3f8c154

Browse files
committed
bugfix: for unknown reasons WarpUtils produced wrong command lines
1 parent 9a16838 commit 3f8c154

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

nipype/interfaces/fsl/tests/test_auto_ConvertWarp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def test_ConvertWarp_inputs():
2020
),
2121
jacobian_min=dict(argstr='--jmin=%f',
2222
),
23+
midmat=dict(argstr='--midmat=%s',
24+
),
2325
out_abswarp=dict(argstr='--absout',
2426
xor=['out_relwarp'],
2527
),

nipype/interfaces/fsl/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ class WarpUtilsInputSpec(FSLCommandInputSpec):
14671467
'would typically be the file that was specified '
14681468
'with the --in argument when running fnirt.'))
14691469

1470-
out_format = traits.Either('field', 'spline', argstr='--outformat=%s',
1470+
out_format = traits.Either('spline', 'field', argstr='--outformat=%s',
14711471
desc=('Specifies the output format. If set to field (default) '
14721472
'the output will be a (4D) field-file. If set to spline '
14731473
'the format will be a (4D) file of spline coefficients.'))
@@ -1511,10 +1511,8 @@ class WarpUtilsInputSpec(FSLCommandInputSpec):
15111511
'stored separately from the displacements).'))
15121512

15131513
class WarpUtilsOutputSpec(TraitedSpec):
1514-
out_file = File(exists=True,
1515-
desc=('Name of output file, containing the warp as field or coefficients.'))
1516-
out_jacobian = File(exists=True,
1517-
desc=('Name of output file, containing the map of the determinant of '
1514+
out_file = File(desc=('Name of output file, containing the warp as field or coefficients.'))
1515+
out_jacobian = File(desc=('Name of output file, containing the map of the determinant of '
15181516
'the Jacobian'))
15191517

15201518

@@ -1557,6 +1555,8 @@ def _parse_inputs(self, skip=None):
15571555
trait_spec = self.inputs.trait('out_jacobian')
15581556
trait_spec.name_source = ['in_file']
15591557
trait_spec.name_template = '%s_jac'
1558+
else:
1559+
skip+=['out_jacobian']
15601560

15611561
skip+=['write_jacobian']
15621562
return super(WarpUtils, self)._parse_inputs(skip=skip)

0 commit comments

Comments
 (0)