danforthcenter / plantcv

Plant phenotyping with image analysis
Mozilla Public License 2.0
665 stars 265 forks source link

1553-combined-object-filter #1555

Closed k034b363 closed 4 months ago

k034b363 commented 5 months ago

Describe your changes Taking the logic of existing filter on eccentricity, this function expands to allow filtering on any numeric (float or int) object property calculated by skimage.measure.regionprops. The default threshold is 0 and cut_side="upper", which will filter nothing for most (but not all) properties. Users can also specify keeping objects below the given threshold by setting cut_side to "lower".

Type of update Is this a:

Associated issues This closes #1553

Additional context Add any other context about the problem here.

For the reviewer See this page for instructions on how to review the pull request.

deepsource-io[bot] commented 5 months ago

Here's the code health analysis summary for commits 1672a95..49753e0. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePython
Branch Coverage100%100%
Composite Coverage100%100%
Line Coverage100%100%
New Branch Coverage100%100%
New Composite Coverage100%100%
New Line Coverage100%, ✅ Above Threshold100%, ✅ Above Threshold

💡 If you’re a repository administrator, you can configure the quality gates from the settings.
k034b363 commented 5 months ago

Sample image and notebook for testing in data_science drive in jupyter/filter_objs

nfahlgren commented 4 months ago

@k034b363 is the updated function name okay? I figure since it is in the filters submodule we can exclude filter in the function name. So now it would "read" pcv.filters.obj_props

k034b363 commented 4 months ago

@k034b363 is the updated function name okay? I figure since it is in the filters submodule we can exclude filter in the function name. So now it would "read" pcv.filters.obj_props

Yep, that makes sense! I didn't choose the name with any reasoning or logic, I like the change better