Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix transform_to_data_extent converting labels to images #791

Merged
merged 3 commits into from
Dec 16, 2024

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.79%. Comparing base (803a66e) to head (7dc584a).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #791   +/-   ##
=======================================
  Coverage   91.79%   91.79%           
=======================================
  Files          45       45           
  Lines        7055     7055           
=======================================
  Hits         6476     6476           
  Misses        579      579           
Files with missing lines Coverage Δ
src/spatialdata/_core/operations/_utils.py 92.15% <ø> (ø)

@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'").

@LucaMarconato LucaMarconato enabled auto-merge (squash) December 16, 2024 16:07
@LucaMarconato LucaMarconato merged commit 243554e into scverse:main Dec 16, 2024
8 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rasterize converts labels to images
2 participants