Generic features! 🎉 #102
Merged
cmalinmayor merged 124 commits intomainfrom Oct 31, 2025
Merged
Conversation
This matches our previous Tracks functionality by allowing either a single position attribute or a list of position attributes on the graph. Updated the json schema to specifically store the time and position rather than inferring them from location.
Constructs the feature set from the provided pos_attr, time_attr, and segmentation. Also deprecates using Tracks.time_attr and Tracks.pos_attr in favor of the tracks.features.time and tracks.features.position. However, only actually updates the references inside the Tracks class.
The references to pos_attr remain in the rest of the code base. Running the funtracks tests issues 98 warnings.
This enables removing references to tracks.time_attr and tracks.pos_attr from the SolutionTracks.
…r for Tracks Also retains the ability to load tracks generated before the addition of the FeatureSet by passing the time_attr and pos_attr features into the constructor of Tracks.
…attr This was done with the minimal disruption to the existing code. Therefore, I used feature.key to get the same strings that were used as keys in the actions before. A larger refactor will be needed to actually use the features as keys instead of strings, if we want to do that in the future.
Add FeatureSet to Tracks
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
Also remove test references to get_area and rename _get_static_features
Remove NodeAttr and EdgeAttr Enums
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
==========================================
- Coverage 89.32% 88.92% -0.41%
==========================================
Files 25 39 +14
Lines 1134 1742 +608
==========================================
+ Hits 1013 1549 +536
- Misses 121 193 +72 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Attempted to deprecate rather than ruin backward compatibility, but definitely needs to be checked against the tracker.