Closed ejeschke closed 3 years ago
Thanks!
Since @obi-wan76 has a real use case for this, perhaps he is the best person to review.
@pllim, if you think this approach has merit, I can push an additional commit to fix Pick
to (potentially) solve the problem outlined in #969. We would need some careful testing (mostly with "ill-behaved" objects) to make sure it is working correctly.
I think it is good to have consistent values displayed across plugin and don't see anything wrong with using center of mass. 👍
Okay, this PR is amended as follows:
Now plot is the same except for rounding of floats.
We can revisit the idea of using the centroid center in a different PR, if desired.
@obi-wan76, can you check again with your binary object image using this PR? I think you will find the plot is now consistent with the numbers reported in the rest of the UI. LMK if not.
BTW, one side effect of this change is that the graph curves will not align as consistently as before (depending on how close to the edge of the box), although the numbers will. That may alarm some users.
Yes, the values are consistent between the figure and Pick Readout. Thanks!
That may alarm some users.
@ejeschke , which one is the lesser of two evils?
@obi-wan76 is happy with this patch, so I am okay with merging as-is unless you still have concerns.
Thanks for the fix! 😄
Changes the center point of FWHM calculation in
evaluate_peaks
from the local peak to the center-of-mass centroid of the local peak, if it can be calculated.This may result in a slightly more accurate FWHM in the
evaluate_peaks
pass that can be used to solve the problem outlined in #969Fix #969