Skip to content

Conversation

HaleySchuhl
Copy link
Contributor

@HaleySchuhl HaleySchuhl commented Jan 18, 2024

Describe your changes
Add a new filtering function to the main plantcv workspace that filters objects in a binary mask based on it's eccentricity e.g. keep more circular things while long/oblong objects get filled in.

Type of update
Is this a:

  • New feature

Associated issues

  • functionality originally added during Interactive object count #754 but splitting apart into more manageable PRs, and updating interactive-object-count from main so we can also merge all those commits eventually.

Additional context
Highly helpful for stomata and pollen grain image cleanup

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

  • PR functionality reviewed in a Jupyter Notebook
  • All tests pass
  • Test coverage remains 100%
  • Documentation tested
  • New documentation pages added to plantcv/mkdocs.yml
  • Changes to function input/output signatures added to updating.md
  • Code reviewed
  • PR approved

@HaleySchuhl HaleySchuhl added new feature New feature ideas and solutions work in progress Mark work in progress labels Jan 18, 2024
@HaleySchuhl HaleySchuhl self-assigned this Jan 18, 2024
Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 99.85%. Comparing base (ec2e2df) to head (3a0628d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1430      +/-   ##
==========================================
- Coverage   99.98%   99.85%   -0.13%     
==========================================
  Files         159      161       +2     
  Lines        7048     7066      +18     
==========================================
+ Hits         7047     7056       +9     
- Misses          1       10       +9     
Flag Coverage Δ
unittests 99.85% <47.05%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
plantcv/plantcv/__init__.py 100.00% <ø> (ø)
plantcv/plantcv/filter/__init__.py 100.00% <100.00%> (ø)
plantcv/plantcv/filter/eccentricity.py 40.00% <40.00%> (ø)

... and 1 file with indirect coverage changes

@HaleySchuhl HaleySchuhl added ready to review and removed work in progress Mark work in progress labels Jan 22, 2024
add new function
@HaleySchuhl
Copy link
Contributor Author

Just added materials for the reviewer to the shared google drive, in a folder called detect_discs_1430

@HaleySchuhl HaleySchuhl requested a review from annacasto January 22, 2024 19:31
Copy link
Contributor

@annacasto annacasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a test notebook called pr1430_detect-discs to the shared google drive in the detect_dics folder

@codecov-commenter
Copy link

codecov-commenter commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.98%. Comparing base (ec2e2df) to head (a5ede9b).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1430   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         159      161    +2     
  Lines        7048     7066   +18     
=======================================
+ Hits         7047     7065   +18     
  Misses          1        1           
Flag Coverage Δ
unittests 99.98% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
plantcv/plantcv/__init__.py 100.00% <ø> (ø)
plantcv/plantcv/filters/__init__.py 100.00% <100.00%> (ø)
plantcv/plantcv/filters/eccentricity.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@nfahlgren nfahlgren added ready to review and removed work in progress Mark work in progress labels Feb 27, 2024
@HaleySchuhl HaleySchuhl changed the title Add pcv.filter.eccentricity Add pcv.filters.eccentricity Feb 28, 2024
Copy link
Contributor Author

@HaleySchuhl HaleySchuhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now! Apologies for not pushing my re-naming commits sooner to save you a minute or two but thanks for the help @nfahlgren for getting this function all fixed up.

Only minor thing I noticed, but didn't want to rerun test for this, is updating.md I think was meant to call the output variable filtered_mask instead of filterec_mask.

@nfahlgren nfahlgren merged commit 8a69fe0 into main Feb 28, 2024
@nfahlgren nfahlgren deleted the add_detect_discs branch February 28, 2024 17:49
@nfahlgren nfahlgren added this to the PlantCV v4.3 milestone Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature ideas and solutions ready to review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants