Add intensity_median to regionprops#7745
Merged
lagru merged 3 commits intoscikit-image:mainfrom May 28, 2025
Merged
Conversation
87f8b57 to
336bc4c
Compare
336bc4c to
bd163ed
Compare
To avoid that the to-be-added 'intensity_median' feature shadows the extra feature in the tests, we rename from 'intensity_mean' to 'custom_intensity_mean'.
bd163ed to
22b0adc
Compare
lagru
approved these changes
Apr 9, 2025
Member
lagru
left a comment
There was a problem hiding this comment.
Thanks, looks ready to merge in my opinion. 😊
Member
|
Thank you @imagejan! |
mkcor
reviewed
Jun 2, 2025
|
|
||
|
|
||
| def intensity_median(regionmask, image_intensity): | ||
| def custom_intensity_median(regionmask, image_intensity): |
Member
There was a problem hiding this comment.
@imagejan I know the PR has been merged already, but just to confirm: Was the function renamed just so its name would be different from the property name?
Contributor
Author
There was a problem hiding this comment.
Thanks for reviewing, @mkcor! Yes, this change was just to avoid the conflict of this custom property and the now-added built-in property.
| **intensity_mean** : float | ||
| Average of intensity values in the region. | ||
| **intensity_median** : float | ||
| Value with the median intensity in the region. |
Member
There was a problem hiding this comment.
For consistency, I would use "Value of ..." as in the other property descriptions. Happy to submit it in a tiny follow-up PR.
lagru
pushed a commit
that referenced
this pull request
Jun 3, 2025
This is a tiny, minor follow-up to #7745.
matthew-brett
added a commit
to matthew-brett/scikit-image
that referenced
this pull request
Jul 7, 2025
* origin/main: Deprecate estimate method in favor of class constructor (scikit-image#7771) Temporary fix for Visual Studio & Clang incompatibility in Windows image (scikit-image#7835) Address deprecations in Pillow 11.3 (scikit-image#7828) Remove unused & obsolete `legacy_datasets`, `legacy_registry` vars (scikit-image#7677) Draft migration guide for skimage2 (scikit-image#7785) Do not report failure in wheels sub-recipe (scikit-image#7806) Use consistent wording in property description. (scikit-image#7804) Add intensity_median to regionprops (scikit-image#7745) CI: Update pypa/gh-action-pypi-publish to v1.12.4 for attestations on PyPI (scikit-image#7793) Document output dtype for transform.resize. (scikit-image#7792) Use `cibuildwheel` to build WASM/Pyodide wheels for `scikit-image`, push nightlies to Anaconda.org (scikit-image#7440) DOC: Include missing gain parameter in adjust_gamma equation (scikit-image#7763) Temporarily pin to `pyodide-build==0.30.0`, and ensure that the correct xbuildenvs are used (scikit-image#7788) Deprecate old names & attributes in RegionProperties (scikit-image#7778) Pin JasonEtco/create-an-issue action to SHA for v2.9.2 (scikit-image#7787) Make doctest-plus work with spin (scikit-image#7786) Report failures on main via issue (scikit-image#7752) Use `workers` instead of alternate parameter names (scikit-image#7302) Fix f-string in otsu plot (scikit-image#7780) Further document use of regionprops function and fix terms. (scikit-image#7518)
matthew-brett
added a commit
to matthew-brett/scikit-image
that referenced
this pull request
Jul 14, 2025
* origin/main: (31 commits) Update import convention in certain gallery examples (scikit-image#7764) Refactor fundamental matrix scaling (scikit-image#7767) Add unit test for cval unequal to zero Forward in _generic_edge_filter Remove superfluous mask argument from _generic_edge_filter Only report failure on main branch once Deprecate estimate method in favor of class constructor (scikit-image#7771) Temporary fix for Visual Studio & Clang incompatibility in Windows image (scikit-image#7835) Address deprecations in Pillow 11.3 (scikit-image#7828) Remove unused & obsolete `legacy_datasets`, `legacy_registry` vars (scikit-image#7677) Draft migration guide for skimage2 (scikit-image#7785) Do not report failure in wheels sub-recipe (scikit-image#7806) Use consistent wording in property description. (scikit-image#7804) Add intensity_median to regionprops (scikit-image#7745) CI: Update pypa/gh-action-pypi-publish to v1.12.4 for attestations on PyPI (scikit-image#7793) Document output dtype for transform.resize. (scikit-image#7792) Use `cibuildwheel` to build WASM/Pyodide wheels for `scikit-image`, push nightlies to Anaconda.org (scikit-image#7440) DOC: Include missing gain parameter in adjust_gamma equation (scikit-image#7763) Temporarily pin to `pyodide-build==0.30.0`, and ensure that the correct xbuildenvs are used (scikit-image#7788) Deprecate old names & attributes in RegionProperties (scikit-image#7778) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
intensity_mediantoskimage.measure.regionprops.Closes #7742.
Checklist
./doc/examplesfor new featuresRelease note
For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.