Skip to content

Fix openslide offset#13

Open
sohmandal wants to merge 6 commits intomainfrom
fix-openslide-offset
Open

Fix openslide offset#13
sohmandal wants to merge 6 commits intomainfrom
fix-openslide-offset

Conversation

@sohmandal
Copy link
Owner

This PR fixes a coordinate‑offset bug that was causing QuPath‑exported ROIs to be misaligned on slides with non‑zero openslide.bounds-x/y. The updates read the bounds offsets, shift ROI/tissue/artefact geometries and adjust output GeoJSONs accordingly. The issue and discussion are documented in this Image.sc forum thread.

@sohmandal sohmandal requested a review from josegcpa February 26, 2026 02:08
Copy link
Collaborator

@josegcpa josegcpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this looks good to me!

I have just one question - is there any circumstance where non-zero bounds would not need to be applied? The grandqc workflows having an option to apply these makes it seem as though this is optional but I am not sure if that is the case; could you please confirm this whenever you can?

@sohmandal
Copy link
Owner Author

Good question! Non-zero bounds are effectively required for correct final exported annotation coordinates (GeoJSON/centroids) whenever outputs are intended in viewer/display i.e. QuPath space. The apply_bounds_offset option is present so internal processing in the WSI prediction entrypoint can remain in raw slide coordinates and so zero-bounds slides are handled cleanly afterwards.

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 this pull request may close these issues.

2 participants