-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feature.peak_local_max changes labels #5047
Comments
Thank you @odoublewen for the report! I confirm the bug and that #4760 is not affected 🎉 |
@rfezzani I am puzzling over the for label_idx, roi in enumerate(ndi.find_objects(_labels)):
label_mask = labels[roi] == label_idx + 1 Since But I must be missing something. (Apologies for making this offhand comment without spending the time to play around with the code, and delve into the unit tests.) And thank you again for your work on this much needed refactoring! |
@odoublewen, you forgot to mention the essential if roi is None:
continue present in the cited code chunk! In fact, |
Hi @rfezzani - I can confirm that I am no longer seeing the bug reported in this issue, but since upgrading from 0.17.2, I am seeing a new behavior, which I think might be a new bug. When I use |
Description
When non sequential
labels
are provided as input topeak_local_max
, the values get altered.If the function needs to update the values, it ought to copy the matrix.
I suppose this bug will be addresses by #4760 (there is a description "labels renumbering is avoided" in that PR). But I didn't find any explicit description of this bug, which seems serious due to its silent nature, so I thought I should document it.
Way to reproduce
labels
labels
Version information
The text was updated successfully, but these errors were encountered: