Filter Operations on Label2DModel and Shape#946
Filter Operations on Label2DModel and Shape#946selmanozleyen wants to merge 15 commits intoscverse:mainfrom
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.08% 92.17% +0.08%
==========================================
Files 48 48
Lines 7446 7500 +54
==========================================
+ Hits 6857 6913 +56
+ Misses 589 587 -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
timtreis
left a comment
There was a problem hiding this comment.
Can this PR make use of
and ?| from spatialdata.datasets import blobs_annotating_element | ||
|
|
||
|
|
||
| def test_filter_labels2dmodel_by_instance_ids(): |
There was a problem hiding this comment.
Parametrise, don't loop over inputs
There was a problem hiding this comment.
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: