Skip to content

Commit af7aa27

Browse files
committed
enh: address review comment by @mgxd
1 parent 1fc518b commit af7aa27

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

niworkflows/interfaces/nibabel.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33
"""Nibabel-based interfaces."""
4-
from pathlib import Path
54
import numpy as np
65
import nibabel as nb
76
from nipype import logging
@@ -124,10 +123,8 @@ def _run_interface(self, runtime):
124123

125124
self._results["out_files"] = []
126125
for i, img_3d in enumerate(nb.four_to_three(img)):
127-
out_file = str(
128-
Path(fname_presuffix(in_file, suffix=f"_idx-{i:03}",
129-
newpath=runtime.cwd)).absolute()
130-
)
126+
out_file = fname_presuffix(in_file, suffix=f"_idx-{i:03}",
127+
newpath=runtime.cwd)
131128
img_3d.to_filename(out_file)
132129
self._results["out_files"].append(out_file)
133130

0 commit comments

Comments
 (0)