-
Couldn't load subscription status.
- Fork 71
Filter Operations on Label2DModel and Shape #946
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: main
Are you sure you want to change the base?
Filter Operations on Label2DModel and Shape #946
Conversation
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #946 +/- ##
==========================================
+ Coverage 92.11% 92.19% +0.08%
==========================================
Files 48 48
Lines 7440 7494 +54
==========================================
+ Hits 6853 6909 +56
+ Misses 587 585 -2
🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
…om/selmanozleyen/spatialdata into feature/filter_operations_on_label
for more information, see https://pre-commit.ci
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.
Can this PR make use of
| def match_sdata_to_table( |
| def match_element_to_table( |
| from spatialdata.datasets import blobs_annotating_element | ||
|
|
||
|
|
||
| def test_filter_labels2dmodel_by_instance_ids(): |
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.
Parametrise, don't loop over inputs
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.
the loop here is for the multiple scales. Or did you mean something else?
|
@timtreis About using |
|
@timtreis now I make use of |
Hi @timtreis @ilan-gold ,
I am working on this PR also and thought maybe it will be smart to have the code I use there supported here because they seem useful at first glance. So I wrote and tested subset_sdata_by_table_mask in this PR.
@LucaMarconato I can't ask for reviews other than @ilan-gold do you know why?
Some notes
PointsModel(GeoDataFrame) it assumes the index isinstance_idalwaysLabel2DModelthe image is assumed to have theinstance_ids as values themselvesLabel2DModelwhen the element is axr.DataTreeit assumes the keys are the different scalesscanpy.pp.filter_cellsCode excerpt from tests to demonstrate the usage: