-
-
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
regionprops: consistent naming scheme #5213
Comments
If this change is welcome, then I could create a PR for it. |
Thanks @maxfrei750! Certainly I'd like to revisit these and I agree that for 1.0 we want to make sure we like all of the naming conventions for regionprops — one of our most important functions. We should probably wait for a bit of discussion here, from everyone and especially from @scikit-image/core, about what names they would consider changing from regionprops. |
I suggest @maxfrei750 comes up with a proposal for a naming scheme, and we leave the old names in place while updating the documentation to only provide the new ones. Then, set a TODO to update to only the new names in a couple of releases (nothing urgent). |
As requested by @stefanv here is a proposal for a naming scheme: Naming Scheme
generic property
1st most frequent specification
2nd most frequent specification
... Problems
Additional considerationsWe could use this opportunity to rename some properties to be a little more explicit:
Examples
|
@maxfrei750 This looks great, thanks! The one I don't find particularly intuitive is |
I also think |
@stefanv Thanks for the feedback.
That would be quite powerful, because it would also allow the calculation of the tilt angle of the axis. To not lose any functionality, we could then have:
Would you advise to couple this change of functionality with the PR that implements the renaming?
I agree that the naming matches the specificity rule. However, |
I have the same intuition about the above: |
Agreed. I'll create a PR, when I get to it. |
While working on the PR, it occurred to me that for reasons of consistency, it might be good to rename the arguments of
Maybe even
@stefanv What do you think? |
Description
It would be nice to have a consistent naming scheme for the properties retrieved by the
measure.regionprops
function.For instance, there are
feret_diameter_max
andmax_intensity
. It would be nice to haveintensity_max
instead.Other candidates are:
Since these changes would not be backwards compatible, they could be targeted for version 1.0.
Of course, it would also be a possibility, to rename
feret_diameter_max
tomax_feret_diameter
. However, this would prevent similar properties (i.e. all the different kinds of areas, intensities, moments and images) to be grouped together based on their name (see the discussion in #4820).The text was updated successfully, but these errors were encountered: