diff --git a/nipype/algorithms/metrics.py b/nipype/algorithms/metrics.py index bffce04161..b26e63639a 100644 --- a/nipype/algorithms/metrics.py +++ b/nipype/algorithms/metrics.py @@ -572,7 +572,7 @@ def _run_interface(self, runtime): nb.Nifti1Image(errmap.astype(np.float32), nii_ref.get_affine(), hdr).to_filename(self._out_file) - return runtime + return runtime def _list_outputs(self): outputs = self.output_spec().get() diff --git a/nipype/algorithms/tests/test_auto_ErrorMap.py b/nipype/algorithms/tests/test_auto_ErrorMap.py index 99048aea9c..e729d7bd0a 100644 --- a/nipype/algorithms/tests/test_auto_ErrorMap.py +++ b/nipype/algorithms/tests/test_auto_ErrorMap.py @@ -23,7 +23,8 @@ def test_ErrorMap_inputs(): yield assert_equal, getattr(inputs.traits()[key], metakey), value def test_ErrorMap_outputs(): - output_map = dict(out_map=dict(), + output_map = dict(distance=dict(), + out_map=dict(), ) outputs = ErrorMap.output_spec() diff --git a/nipype/algorithms/tests/test_errormap.py b/nipype/algorithms/tests/test_errormap.py index 5c6110a020..46f23a9ed9 100644 --- a/nipype/algorithms/tests/test_errormap.py +++ b/nipype/algorithms/tests/test_errormap.py @@ -32,7 +32,7 @@ def test_errormap(): errmap.inputs.in_ref = os.path.join(tempdir, 'alan.nii.gz') errmap.out_map = os.path.join(tempdir, 'out_map.nii.gz') result = errmap.run() - yield assert_equal, result.outputs.distance, 1.125 + yield assert_equal, result.outputs.distance, 1.125 # Square metric errmap.inputs.metric = 'sqeuclidean' @@ -42,9 +42,9 @@ def test_errormap(): # Linear metric errmap.inputs.metric = 'euclidean' result = errmap.run() - yield assert_equal, result.outputs.distance, 0.875 + yield assert_equal, result.outputs.distance, 0.875 - # Masked + # Masked errmap.inputs.mask = os.path.join(tempdir, 'mask.nii.gz') result = errmap.run() yield assert_equal, result.outputs.distance, 1.0 diff --git a/nipype/interfaces/ants/registration.py b/nipype/interfaces/ants/registration.py index c8f51ec4ca..7f56764d71 100644 --- a/nipype/interfaces/ants/registration.py +++ b/nipype/interfaces/ants/registration.py @@ -395,7 +395,7 @@ class Registration(ANTSCommand): >>> outputs = reg4._list_outputs() >>> print outputs #doctest: +ELLIPSIS {'reverse_invert_flags': [], 'inverse_composite_transform': ['.../nipype/testing/data/output_InverseComposite.h5'], 'warped_image': '.../nipype/testing/data/output_warped_image.nii.gz', 'inverse_warped_image': , 'forward_invert_flags': [], 'reverse_transforms': [], 'composite_transform': ['.../nipype/testing/data/output_Composite.h5'], 'forward_transforms': []} - + >>> # Test collapse transforms flag >>> reg4b = copy.deepcopy(reg4) >>> reg4b.inputs.write_composite_transform = False diff --git a/nipype/interfaces/camino/dti.py b/nipype/interfaces/camino/dti.py index 1e6d42a288..7f12c915d3 100644 --- a/nipype/interfaces/camino/dti.py +++ b/nipype/interfaces/camino/dti.py @@ -549,7 +549,11 @@ class Track(CommandLine): def _list_outputs(self): outputs = self.output_spec().get() - outputs['tracked'] = os.path.abspath(self._gen_outfilename()) + if isdefined(self.inputs.out_file): + out_file_path = os.path.abspath(self.inputs.out_file) + else: + out_file_path = os.path.abspath(self._gen_outfilename()) + outputs['tracked'] = out_file_path return outputs def _gen_filename(self, name): diff --git a/nipype/testing/data/von-ray_errmap.nii.gz b/nipype/testing/data/von-ray_errmap.nii.gz new file mode 100644 index 0000000000..de7d3985d3 Binary files /dev/null and b/nipype/testing/data/von-ray_errmap.nii.gz differ diff --git a/nipype/testing/data/von_errmap.nii.gz b/nipype/testing/data/von_errmap.nii.gz new file mode 100644 index 0000000000..8e79a46d12 Binary files /dev/null and b/nipype/testing/data/von_errmap.nii.gz differ