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

Fix transform_to_data_extent converting labels to images #791

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aeisenbarth
Copy link
Contributor

This PR ensures transform_to_data_extent preserves the data type of labels and does not convert them to images. Here, I chose the most minimal solution to pass the (missing) parameter return_regions_as_labels=True and override its default of False.

Meanwhile, @quentinblampey has already documented the parameter return_regions_as_labels in rasterize.

Closes #783

@aeisenbarth aeisenbarth changed the title Fix issue783 Fix transform_to_data_extent converting labels to images Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.84%. Comparing base (6694c91) to head (014eb37).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #791   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files          45       45           
  Lines        6893     6893           
=======================================
  Hits         6331     6331           
  Misses        562      562           
Files with missing lines Coverage Δ
src/spatialdata/_core/operations/_utils.py 92.15% <ø> (ø)
---- 🚨 Try these New Features:

@aeisenbarth
Copy link
Contributor Author

CI is failing, probably due to a mismatch of Zarr and AnnData versions ("cannot import name 'Array' from 'zarr.core'").

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.

rasterize converts labels to images
1 participant