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

ROI upsampling issue when original image resolution is not divisible by 2 #771

Open
jluethi opened this issue Jun 26, 2024 · 0 comments
Open
Labels

Comments

@jluethi
Copy link
Collaborator

jluethi commented Jun 26, 2024

We run into a problem when the original, high res data is not divisible by 2 and in a workflow, segmentation of initial objects (organoids) is performed at level 2. If the user then tries to segment single cells within organoids at level 0 (=> needs to load the level 2 organoid segmentation maps & upsample them to level 0 for masking), it fails here:

"Incommensurable upscale attempt, "

And we get an error like:

ValueError: Cannot convert highres_region=(slice(0, 227, None), slice(0, 580, None), slice(5540, 6524, None)), given lowres_shape=(227, 3885, 3585) and highres_shape=(227, 15543, 14342). Incommensurable sizes highres_size=15543 and lowres_size=3885.

The high-res image has a shape of 15543x14342. This happened because the original image was a search-first dataset: Images were put into the OME-Zarr grid based on their microscope stage coordinates, not as a grid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

1 participant