-
Notifications
You must be signed in to change notification settings - Fork 61
Add utilities to convert feature masks to cell masks and vice versa, and add optional cell mask output from segmentation #512
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
base: RC_v1.6.x
Are you sure you want to change the base?
Conversation
…_features to __init__
…_features to __init__
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## RC_v1.6.x #512 +/- ##
=============================================
+ Coverage 63.53% 64.00% +0.46%
=============================================
Files 27 27
Lines 3842 3892 +50
=============================================
+ Hits 2441 2491 +50
Misses 1401 1401
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Linting results by Pylint:Your code has been rated at 8.31/10 (previous run: 8.31/10, +0.00) |
JuliaKukulies
left a comment
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.
Very useful addition, @w-k-jones! I have tested this with our example notebooks and it works without problems. The design looks also good to me!
I am just wondering if there was a reason why we are not adding the capability to have either cell or track numbers in the mask (and limit the conversion from features to track to a one-direction conversion only). Same is true for filtered features. With the function that you have for converting features to cell numbers, it seems like an easy add to instead of the cell numbers use tracks or filtered features.
Also, what do you think about modifying one of our example notebooks in a way that we apply this new function. I think as of now, most notebooks so the tracking first and then the segmentation, but it would be fairly easy to change one example to the tracking first and then show how the returned mask in the segmentation contains the cell numbers. I am happy to help with such an example!
Adds features requested in #508, along with postprocessing utilities to perform the conversion in both directions. Note that in the presence of stub cells, this operation cannot be performed perfectly.
Some additional features not currently included are conversion to track masks (although the reverse is not possible) and a function for simultaneously filtering features from both a feature dataframe and the corresponding feature mask.