Skip to content

Commit 31990fd

Browse files
committed
mrtrix output fix
1 parent ddf6973 commit 31990fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nipype/interfaces/mrtrix/tracking.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from nipype.interfaces.base import CommandLineInputSpec, CommandLine, traits, TraitedSpec, File
1313
from nipype.utils.filemanip import split_filename
1414
import os, os.path as op
15+
from nipype.interfaces.traits_extension import isdefined
1516

1617
class Tracks2ProbInputSpec(CommandLineInputSpec):
1718
in_file = File(exists=True, argstr='%s', mandatory=True, position=-2,
@@ -54,7 +55,9 @@ class Tracks2Prob(CommandLine):
5455

5556
def _list_outputs(self):
5657
outputs = self.output_spec().get()
57-
outputs['tract_image'] = op.abspath(self._gen_outfilename())
58+
outputs['tract_image'] = self.inputs.out_filename
59+
if not isdefined(outputs['tract_image']):
60+
outputs['tract_image'] = op.abspath(self._gen_outfilename())
5861
return outputs
5962

6063
def _gen_filename(self, name):

0 commit comments

Comments
 (0)