-
Notifications
You must be signed in to change notification settings - Fork 271
Add segment_ends
and Update morphology tips outputs
#1644
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
Conversation
avoid saving to outputs in the helper function but produce the same relevant outputs, update instances of find_tips getting used throughout morphology
Here's the code health analysis summary for commits Analysis Summary
Code Coverage Report
|
img input not just for plotting debug
add optimal assignment input
since no outputs in sorting, skip the label storage. wasn't used downstream but also don't need to store anymore since _find_tips also doesn't store to outputs
rearrage ome imports and change where things are getting called from
decided to go with returning a list of sorted objects instead of a list of re-sorting IDs
missing branch points, in the case of disconnected leaves, will not be sortable so remove them from returned resorted segments
There was a problem hiding this 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, it works the way I would expect it to and reorders branches to something biologically meaningful on both well behaved and less clean maize pictures. The movement of some functions to helpers makes the previously complex morphology functions quite a bit easier to read as well.
Describe your changes
_iterative_prune
into the_helper.py
file to avoid circular imports (this unfortunately touches most of the functions in this package)find_tips
(adds a helper function_find_tips
that is used internally by many functions and doesn't store outputs so they do not accidentally get overwritten)pcv.morphology.segment_ends
which returns: Re-ordered leaf segments, debug image, list of branch point coordinates, list of leaf tip coordinatespcv.morphology.analyze_stem
where thelabel=None
was causing no data to get saved to Outputs. Resolved by updating with appropriate labels.Type of update
Is this a:
Associated issues
plantcv.morphology
sub-package #1643Additional context
tips
coordinates toOutputs
was easily overwritten by other morphology functions that utilize thepcv.morphology.find_tips
function.For the reviewer
See this page for instructions on how to review the pull request.
plantcv/mkdocs.yml
updating.md