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

Force labels data type to be uint32 #21

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Force labels data type to be uint32 #21

merged 1 commit into from
Nov 20, 2024

Conversation

ziw-liu
Copy link
Collaborator

@ziw-liu ziw-liu commented Nov 14, 2024

Due to upstream issue (napari/napari#7327), the colormap of labels cannot be changed if their dtype is not uint32, which causes hideous error when assigning manual cluster IDs to uint16 labels in napari-clusters-plotter.

This PR is a workaround when the fix upstream is pending.

@ziw-liu ziw-liu added upstream Problem due to upstream issues workaround Temporary fixes labels Nov 14, 2024
@Soorya19Pradeep
Copy link

@ziw-liu , this partially works for me. Half the labels are allocated a cluster ID whereas half of them are zeros. Is this related to some issue with the tracking metadata itself?
image

@Soorya19Pradeep
Copy link

I tested the same with the new predictions @alishbaimran generated and it works better. On annotating on the UMAP, the cluster id allocation excludes cells with partial bounding boxes at the boundary of the frame. This makes sense since those cells are not included in the analysis.
image

@ziw-liu
Copy link
Collaborator Author

ziw-liu commented Nov 20, 2024

@Soorya19Pradeep @alishbaimran Can you provide a review? I'd like to deploy this fix soon.

@alishbaimran
Copy link

Works for me!

@ziw-liu ziw-liu merged commit bf85fe4 into main Nov 20, 2024
10 checks passed
@ziw-liu ziw-liu deleted the force-uint32-labels branch November 20, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Problem due to upstream issues workaround Temporary fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants