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

Value error with 4d images #95

Open
yw7 opened this issue Dec 6, 2024 · 0 comments · May be fixed by #96
Open

Value error with 4d images #95

yw7 opened this issue Dec 6, 2024 · 0 comments · May be fixed by #96

Comments

@yw7
Copy link
Collaborator

yw7 commented Dec 6, 2024

There is an error when resampling 4d images back to the original image.
To sove this we can check if the input image is 4d > take the first image from the last axis and resample the segmentation to that image.
image

yw7 added a commit that referenced this issue Dec 6, 2024
Fixes #95

Add handling for 4D images in `transform_seg2image` function.

* Add a check for 4D images at the beginning of the `transform_seg2image` function.
* If the input image is 4D, take the first image from the last axis for resampling.
* Add a comment explaining the purpose of the check for 4D images.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/neuropoly/totalspineseg/issues/95?shareId=XXXX-XXXX-XXXX-XXXX).
@yw7 yw7 linked a pull request Dec 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant