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

Include example use of function regionprops_table in the docs #4348

Merged
merged 8 commits into from
Jan 14, 2020

Conversation

mkcor
Copy link
Member

@mkcor mkcor commented Dec 9, 2019

Description

Closes #4335.

First, I thought about adding another region. It's only a toy example, but it feels too odd to write a for loop to iterate on a length-1 list.

Then, I appended a call to regionprops_table and displayed the result.

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.
  • Consider backporting the PR with @meeseeksdev backport to v0.14.x

doc/examples/segmentation/plot_regionprops.py Outdated Show resolved Hide resolved
doc/examples/segmentation/plot_regionprops.py Outdated Show resolved Hide resolved
doc/examples/segmentation/plot_regionprops.py Outdated Show resolved Hide resolved
@@ -47,3 +58,12 @@

ax.axis((0, 600, 600, 0))
plt.show()

props = regionprops_table(label_img, properties=('centroid',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could perhaps say here that regionprops_table actually computes the properties, while regionprops only does lazy execution.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not; done in 38ddd67.

requirements/docs.txt Outdated Show resolved Hide resolved
@soupault soupault added the 📄 type: Documentation Updates, fixes and additions to documentation label Jan 4, 2020
@soupault soupault added this to the 0.17 milestone Jan 4, 2020
mkcor and others added 3 commits January 8, 2020 18:30
Co-authored-by: Egor Panfilov <egor.v.panfilov@gmail.com>
Co-authored-by: Egor Panfilov <egor.v.panfilov@gmail.com>
@@ -22,9 +24,17 @@

image = rotate(image, angle=15, order=0)

rr, cc = ellipse(100, 100, 60, 50)
image[rr, cc] = 1
Copy link
Member

@soupault soupault Jan 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just realized that there is an issue with coordinates in plotting - https://scikit-image.org/docs/dev/auto_examples/segmentation/plot_regionprops.html. See how the axes are transposed with respect to the ellipse.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixing the major vs minor axes now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in cdf1678. Thanks again :)

Copy link
Member

@soupault soupault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great now! Thank you!

@emmanuelle emmanuelle merged commit 276a7ea into scikit-image:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 type: Documentation Updates, fixes and additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

regionsprops_table is not mentioned in the doc
5 participants