`_filter_table_by_elements` doesn't work for blobs dataset
Hi @LucaMarconato
@timtreis said you're already having issues with some relational query functions, just wanted to let you know that I ran into this issue today:
from spatialdata._core.query.relational_query import match_table_to_element
from spatialdata.datasets import blobs
blob = blobs()
match_table_to_element(blob, "blobs_labels")
gives me AttributeError: 'SpatialImage' object has no attribute 'index'
Current theory is that in the data, there are 27 (0 for bg plus 26 labels?) numbers whereas the table doesn't hold data for the data for the background and therefore only has 26
Also breaks the following notebook: https://spatialdata.scverse.org/en/latest/tutorials/notebooks/notebooks/examples/technology_mibitof.html
Thanks for reporting. I have fixed the bug in https://github.com/scverse/spatialdata/pull/367
Also, I have made two related PRs to improve the usability of get_values():
- https://github.com/scverse/spatialdata/pull/368
- https://github.com/scverse/spatialdata/pull/369
The specific bug reported by @Sonja-Stockhaus is now fixed. Anyway, the mibitof notebook is still broken, apparently still for the same reason.
I will look into it and report back here.