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

[BUG]: Fix FSL std2imgcoord I/O #278

Merged
merged 2 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions docs/changes/newsfragments/278.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bypass FSL ``std2imgcoord`` stdin bug and use recommended piped input for coordinates transformation by `Synchon Mandal`_
7 changes: 4 additions & 3 deletions junifer/data/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,12 @@ def get_coordinates(
std2imgcoord_out_path = element_tempdir / "coordinates_transformed.txt"
# Set std2imgcoord command
std2imgcoord_cmd = [
"std2imgcoord",
"cat",
f"{pretransform_coordinates_path.resolve()}",
"| std2imgcoord",
f"-img {target_data['reference_path'].resolve()}",
f"-warp {extra_input['Warp']['path'].resolve()}",
f"{pretransform_coordinates_path.resolve()}",
f"> {std2imgcoord_out_path.resolve()}",
f"- > {std2imgcoord_out_path.resolve()}",
]
# Call std2imgcoord
std2imgcoord_cmd_str = " ".join(std2imgcoord_cmd)
Expand Down