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 exporting regions' RGB colors #675

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Conversation

yoda-vid
Copy link
Collaborator

Region names can be exported along with their RGB colors, but these values were incorrect for region IDs that included corresponding positive and negative values. The RGB values are fixed here, along with support for generating this export in NumPy v2.

yoda-vid added 2 commits June 26, 2024 23:07
Region export has generated colormaps for the number of labels in the image, but displayed images use a discrete colormap generated for a these labels plus a duplicated set of corresponding negative value labels. The colormap randomization requires this exact number of labels to generate an identical set of colors, meaning that the exported labels have had a different set of colors. Fix by using the same colormap generation wrapper function as used in the setup for labels image display.
Change data type from unsigned to signed int to fix `OverflowError` when adding in negative int labels to a sequence of `uint` labels.
@yoda-vid yoda-vid added the bug Something isn't working label Oct 24, 2024
@yoda-vid yoda-vid added this to the v1.6.0 milestone Oct 24, 2024
@yoda-vid yoda-vid merged commit d186bdb into master Oct 24, 2024
36 checks passed
@yoda-vid yoda-vid deleted the fix_region_export_colors branch October 24, 2024 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant