Skip to content

Commit 1b8fc66

Browse files
committed
Merge pull request #421 from chrisfilo/fix/convert_xfm
Cleanup and return abspath.
2 parents a9a1d01 + e05556f commit 1b8fc66

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nipype/interfaces/fsl/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ class ConvertXFMInputSpec(FSLCommandInputSpec):
897897
xor=_options, requires=["in_file2"],
898898
desc="use secondary matrix to fix scale and skew")
899899
out_file = File(genfile=True, argstr="-omat %s", position=1,
900-
desc="final transformation matrix")
900+
desc="final transformation matrix", hash_files=False)
901901

902902

903903
class ConvertXFMOutputSpec(TraitedSpec):
@@ -927,15 +927,15 @@ def _list_outputs(self):
927927
outputs = self._outputs().get()
928928
outfile = self.inputs.out_file
929929
if not isdefined(outfile):
930-
path, infile1, ext = split_filename(self.inputs.in_file)
930+
_, infile1, _ = split_filename(self.inputs.in_file)
931931
if self.inputs.invert_xfm:
932932
outfile = fname_presuffix(infile1,
933933
suffix="_inv.mat",
934934
newpath=os.getcwd(),
935935
use_ext=False)
936936
else:
937937
if self.inputs.concat_xfm:
938-
path, infile2, ext = split_filename(self.inputs.in_file2)
938+
_, infile2, _ = split_filename(self.inputs.in_file2)
939939
outfile = fname_presuffix("%s_%s" % (infile1, infile2),
940940
suffix=".mat",
941941
newpath=os.getcwd(),
@@ -945,7 +945,7 @@ def _list_outputs(self):
945945
suffix="_fix.mat",
946946
newpath=os.getcwd(),
947947
use_ext=False)
948-
outputs["out_file"] = outfile
948+
outputs["out_file"] = os.path.abspath(outfile)
949949
return outputs
950950

951951
def _gen_filename(self, name):

0 commit comments

Comments
 (0)