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

Radius of circles is not affected by coordinate transformations #179

Closed
LucaMarconato opened this issue Nov 2, 2023 · 5 comments · Fixed by scverse/spatialdata#454 or #193
Closed

Comments

@LucaMarconato
Copy link
Member

The behavior appears for instance with this dataset: https://github.com/giovp/spatialdata-sandbox/blob/main/visium/to_zarr.py.

A fix would be to use the same logic as here: https://github.com/scverse/spatialdata/blob/0446efff1ea8e5f31e5d901d83cf5eb38a72cc4d/src/spatialdata/_core/operations/transform.py#L364. If convenient, we can put this code in a helper function to avoid code duplication.

@timtreis @Sonja-Stockhaus can you please point me to the code used by spatialdata-plot to handle this case?

@timtreis
Copy link
Member

timtreis commented Nov 3, 2023

Line https://github.com/scverse/spatialdata-plot/blob/c1cc849eb8821d42326e34595dc7780f9186824f/src/spatialdata_plot/pl/render.py#L276 and onwards 👍 Essentially we add the artists and then apply the transformations. So I doubt you can easily transfer it to Napari :/

@LucaMarconato
Copy link
Member Author

Thanks @timtreis. Actually I realized that in the spatialdata branch, where I didn't have this bug, napari was automatically adjusting the radius. In that branch I was using ellipses instead of points, so I think this is probably a bug of napari that could be fixed upstream.

@LucaMarconato
Copy link
Member Author

Reported here: napari/napari#6649

@LucaMarconato
Copy link
Member Author

Somehow the bug is still present, I will check this again after we merge the multi_table branch with #199.

@LucaMarconato
Copy link
Member Author

The bug was reintroduced with the multi_table PR, now it's fixed again, but the radius actually turns out to be incorrect, I will track this in another issue: #209.

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