Skip to content

Commit 7dab352

Browse files
author
Erik Ziegler
committed
Absolute paths for out_file
1 parent 6c7383a commit 7dab352

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

nipype/interfaces/freesurfer/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ class MRIMarchingCubes(FSCommand):
878878

879879
def _list_outputs(self):
880880
outputs = self.output_spec().get()
881-
outputs['surface'] = os.path.abspath(self._gen_outfilename())
881+
outputs['surface'] = self._gen_outfilename()
882882
return outputs
883883

884884
def _gen_filename(self, name):
@@ -889,10 +889,10 @@ def _gen_filename(self, name):
889889

890890
def _gen_outfilename(self):
891891
if isdefined(self.inputs.out_file):
892-
return self.inputs.out_file
892+
return os.path.abspath(self.inputs.out_file)
893893
else:
894894
_, name, ext = split_filename(self.inputs.in_file)
895-
return name + ext + '_' + str(self.inputs.label_value)
895+
return os.path.abspath(name + ext + '_' + str(self.inputs.label_value))
896896

897897
class SmoothTessellationInputSpec(FSTraitedSpec):
898898
"""
@@ -946,7 +946,7 @@ class SmoothTessellation(FSCommand):
946946

947947
def _list_outputs(self):
948948
outputs = self.output_spec().get()
949-
outputs['surface'] = os.path.abspath(self._gen_outfilename())
949+
outputs['surface'] = self._gen_outfilename()
950950
return outputs
951951

952952
def _gen_filename(self, name):
@@ -957,8 +957,8 @@ def _gen_filename(self, name):
957957

958958
def _gen_outfilename(self):
959959
if isdefined(self.inputs.out_file):
960-
return self.inputs.out_file
960+
return os.path.abspath(self.inputs.out_file)
961961
else:
962962
_, name, ext = split_filename(self.inputs.in_file)
963-
return name + '_smoothed' + ext
963+
return os.path.abspath(name + '_smoothed' + ext)
964964

0 commit comments

Comments
 (0)