Skip to content

Commit b1d5de3

Browse files
authored
Merge pull request #2734 from yarikoptic/bf-ants-laplacianthickness
FIX: Reuse _gen_filename logic in ants.LaplacianThickness
2 parents eacd567 + ca706c3 commit b1d5de3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nipype/interfaces/ants/segmentation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ def _gen_filename(self, name):
249249

250250
def _list_outputs(self):
251251
outputs = self._outputs().get()
252-
_, name, ext = split_filename(os.path.abspath(self.inputs.input_wm))
253-
outputs['output_image'] = os.path.join(os.getcwd(), ''.join(
254-
(name, self.inputs.output_image, ext)))
252+
if not outputs.get('output_image', None) \
253+
or not isdefined(outputs['output_image']):
254+
outputs['output_image'] = self._gen_filename('output_image')
255255
return outputs
256256

257257

0 commit comments

Comments
 (0)