-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add expand_labels function to dilate segments while avoiding overlaps #4795
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
Conversation
Hello @VolkerH! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-06-29 00:04:46 UTC |
A question I have is: Should this go into |
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Tests, documentation and gallery example have been added with contributions from @jni. |
unrelated to this pull request, but looking at the example screenshot: what is the issue with |
I expect we've done something wrong with the background label, which is supposed to be transparent... |
Fixed! This is now definitely ready for review, @scikit-image/core! =) Again, the remaining failure is unrelated to this PR and due to the matplotlib pre-release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @VolkerH, I simply left some minor comments and the changes in _labels.py
must be reverted, otherwise, it looks good ;)
array->np.array Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
another array->np.array Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
pep8 blank line Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
removed unused import (numpy) Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
removed reference to image.sc discussion thread Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
I've left some suggestions where there was incorrect formatting in the docstring, but I don't think off the top of my head that these should have caused errors. Anyway if I get a chance I'll try to do a local doc build. |
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>
Thanks @jni, I need to read up on sphinx docstring syntax. |
I think I found the culprit, a single whitespace introduced in the docstring of the gallery example (indentation). Hope the build goes through now. |
It looks happy! My original approval stands. =D |
remove blank line as suggested in review Co-authored-by: Emmanuelle Gouillart <emma@plot.ly>
remove whitespace Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
chain decortators instead of using `product` as suggested in review Co-authored-by: Riadh Fezzani <rfezzani@gmail.com>
Thanks for having a look @emmanuelle, I applied your suggestions. Thanks also for pointing out that I overlooked some of @rfezzani 's comments (Apologies! It turned out that Github had truncated those and I had to expand them to make them visible). All tests pass locally, so I hope the CI will also work. Thanks everyone for their feedback. |
Here we go! Another excellent contribution @VolkerH! =D |
Naive question: when will this function be available in the main scikit-image python package? |
It should appear in an upcoming scikit-image 0.18 is release later this year (I don't think we have a specific date at this point). |
Description
This implements growing of connected component regions in a label array up to a specified number of pixels/voxels, but not starting to merge/overlap separate regions.
This functionality is similar to the
Distance N
method in Cellprofiler's IdentifySecondaryObjects module, in fact I adapted the code from there but modified it to support arbitrary dimensions (that should tick a box with @jni). Also see the discussion on image.sc.I am not aware of an original paper I can cite for this, but there probably is one.
I created a demo notebook that shows what this is doing. You can see the demo notebook here.
This is still a WIP.
Tests, examples, and formatting still to do.
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.