Create the annotator class for computing and updating graph features#87
Merged
cmalinmayor merged 25 commits into2-feature-infrastructurefrom Oct 20, 2025
Merged
Create the annotator class for computing and updating graph features#87cmalinmayor merged 25 commits into2-feature-infrastructurefrom
cmalinmayor merged 25 commits into2-feature-infrastructurefrom
Conversation
I kept the implementation very minimal, but when we see what code is duplicated between implementations we can add it to the base class (e.g. setting the feature values, checking if features are present).
I changed the signature of the base annotator to take the Tracks at initialization (since we need to know if it's 2d or 3d to determine valid features). I also changed the signature of compute and update to not take the Tracks, and to compute for all features. We still need to find a way to let the user pick which regionprops features to compute, test them more thoroughly, and see if the API makes sense for other Annotators.
This does not necessarily include all features (intensity, num_pixels are missing), but it solidifies an API that covers all our use cases. The API may be streamlined when other annotators are implemented and when we incorporate it into the workflow.
Includes rewriting some of the geff export code to handle features better
Also creates the annotator module to avoid circular dependencies
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 2-feature-infrastructure #87 +/- ##
============================================================
+ Coverage 89.00% 91.37% +2.36%
============================================================
Files 25 35 +10
Lines 1128 1554 +426
============================================================
+ Hits 1004 1420 +416
- Misses 124 134 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@AnniekStok Feedback welcome of course, but I'm mostly pinging so you see what the changes are and start to get familiar. |
Use uv and just instead of pixi
…ion feature Also involved moving the regionprops features to the features module to avoid circular dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17