Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Merge/SplitSeries write to path of input image, instead of cwd #503

Merged
merged 2 commits into from
Apr 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions niworkflows/interfaces/nibabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def _run_interface(self, runtime):
self._results["out_files"] = []
for i, img_3d in enumerate(nb.four_to_three(img)):
out_file = str(
Path(fname_presuffix(in_file, suffix=f"_idx-{i:03}")).absolute()
Path(fname_presuffix(in_file, suffix=f"_idx-{i:03}",
newpath=runtime.cwd)).absolute()
oesteban marked this conversation as resolved.
Show resolved Hide resolved
)
img_3d.to_filename(out_file)
self._results["out_files"].append(out_file)
Expand Down Expand Up @@ -169,7 +170,8 @@ def _run_interface(self, runtime):
)

img_4d = nb.concat_images(nii_list)
out_file = fname_presuffix(self.inputs.in_files[0], suffix="_merged")
out_file = fname_presuffix(self.inputs.in_files[0], suffix="_merged",
newpath=runtime.cwd)
img_4d.to_filename(out_file)

self._results["out_file"] = out_file
Expand Down