You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems a bit unfortunate that regionprops use unweighted properties by default even when the intensity_image is passed, and that one needs to pay attention to the entire docstring to realize that one needs to use the prop.weighted_foo variants instead of prop.foo to get the weighte centroid, etc. Moreover, certain properties (orientation, major/minor_axis_length) are not available in the weighted form (obviously I can compute them manually from the weighted moments...).
If backcompat was not a concern, I would think that prop.centroid, etc. should clearly have referred to the weighted variants when the intensity image is passed as argument; but I guess this ship may have sailed. Instead, I would suggest adding a clear note next to the doc for the intensity_image parameter pointing to the prop.weighted_foo properties, and also filling in the missing weighted properties indicated above.
The text was updated successfully, but these errors were encountered:
Well, yes, backcompatibility is indeed a major concern for us, and anyway, I think people generally think of orientation etc as relating to the unweighted image. But weighted variants of this, as well as updates to the documentation, would be welcome contributions. Otherwise we'll get to them eventually. =)
I guess one could just have a weighted_regionprops instead of duplicating each and every regionprop (and then the nonweighted regionprops could be implemented in terms of the weighted one).
Description
It seems a bit unfortunate that regionprops use unweighted properties by default even when the intensity_image is passed, and that one needs to pay attention to the entire docstring to realize that one needs to use the prop.weighted_foo variants instead of prop.foo to get the weighte centroid, etc. Moreover, certain properties (orientation, major/minor_axis_length) are not available in the weighted form (obviously I can compute them manually from the weighted moments...).
If backcompat was not a concern, I would think that prop.centroid, etc. should clearly have referred to the weighted variants when the intensity image is passed as argument; but I guess this ship may have sailed. Instead, I would suggest adding a clear note next to the doc for the
intensity_image
parameter pointing to the prop.weighted_foo properties, and also filling in the missing weighted properties indicated above.The text was updated successfully, but these errors were encountered: