-
-
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
Adding new functionality/cleaning up skimage wrappers to ndi.morphology functions #2917
base: main
Are you sure you want to change the base?
Conversation
Hello @nrweir! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on December 16, 2017 at 01:48 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #2917 +/- ##
==========================================
- Coverage 86.04% 86.01% -0.03%
==========================================
Files 337 337
Lines 27032 27052 +20
==========================================
+ Hits 23259 23270 +11
- Misses 3773 3782 +9
Continue to review full report at Codecov.
|
@soupault @stefanv @emmanuelle @jni looks like this passes the various build tests, let me know if you need more on my end. |
adding new args to dilation and erosion adding new args to white tophat, black tophat, opening, and closing bugfix to black_tophat testing to see if grey.py breaks the package removing grey.py after it broke
@nrweir Any reason why you closed the PR? |
@stefanv sorry, I wanted to clean up the messy commit history and add the new tests for the new arguments, and was going to generate a bunch of confusing commits in the process. I'll reopen shortly once I fix everything up. That ok? |
OK, that's perfectly fine! In the future, you can also rename the PR with the "WIP: ..." prefix, and then keep pushing. We squash commits in the end anyway now, so having many is no problem. Thanks for working on this, Nicholas! |
Got it, thanks, and sorry about the confusion! I already had a pretty ugly
commit history and wanted to clean it up so it was easier for reviewers to
follow. It'll be re-opened shortly.
…On Thu, Dec 14, 2017 at 2:07 AM, Stefan van der Walt < ***@***.***> wrote:
OK, that's perfectly fine! In the future, you can also rename the PR with
the "WIP: ..." prefix, and then keep pushing. We squash commits in the end
anyway now, so having many is no problem. Thanks for working on this,
Nicholas!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2917 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMa2oyk7e2yTU5UcQTVz_mQZ_wGb6Ztpks5tAMkigaJpZM4Q8zoH>
.
--
Nicholas Weir
Postdoctoral Fellow, Denic Laboratory
Dept. of Molecular and Cellular Biology
Harvard University
<http://www.linkedin.com/in/niweir/> <http://www.github.com/nrweir/>
<http://www.deniclab.com/>
|
I'm having some issues with Travis builds where there's no obvious issue with my code (passes tests/etc.), but for some reason the build fails during flake8 testing. Couple of examples: https://travis-ci.org/nrweir/scikit-image/jobs/317029332 where it throws an IOError Can someone help me figure out what's wrong? Thank you!! |
(Seems like it only has these flake8 issues in my own Travis-CI, not in the scikit-image build test, so whatever...) |
Description
This PR updates
skimage.morphology.binary
andskimage.morphology.grey
morphology functions to utilize the new arguments available in thendi.morphology
functions they wrap, as per #2597.Previously,
skimage.morphology.binary
andskimage.morphology.grey
did not always directly utilize thendi.morphology
function equivalent (e.g. forskimage.morphology.binary.binary_closing
, the function sequentially called theskimage.morphology.binary.binary_dilation
followed byskimage.morphology.binary.binary_erosion
(which are wrappers tondi.morphology
functions by the same names) rather than directly callingndi.morphology.binary_closing
. For clarity and simplicity, these functions were converted to direct wrappers for thendi
functions.Docstrings have been edited to point out that these
skimage.morphology
functions are wrappers to the equivalentndi.morphology
functions.Because of slight differences between how the
skimage.morphology
functions handled edges compared to the default mirroring implemented by mostndi.morphology
functions, this required small changes to a couple of the tests:skimage.morphology.grey.black_tophat
tests had slightly different outputs as documented in the ENH: pass options from scipy.ndimage to our wrappers #2597 discussion. The expected test outputs were changed accordingly. Similarly,skimage.morphology.grey.opening
produced slightly different edge behavior when made into a cleaner wrapper forndi.morphology.grey_opening
.These two changes were implemented by updating skimage/tests/gray_morph_output.npz.
One additional change was necessary to handle testing of eccentrically shaped strels in
skimage.morphology.tests.test_grey.TestEccentricStructuringElements
. The reasoning and change is documented there.Checklist
[It's fine to submit PRs which are a work in progress! But before they are merged, all PRs should provide:]
./doc/examples
(new features only)Unit tests already existed for all of these functions, but tests don't currently exist to test the additional functionality generated by implementing the new arguments available to
ndi.morphology
functions. This is my next order of business.References
#2597
For reviewers
(Don't remove the checklist below.)
later.
__init__.py
.doc/release/release_dev.rst
.