Deck 8: Tables (Annotations)

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/10

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:03 PM on 9/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

11 Terms

1
New cards

What function returns the built-in example SpatialData object used across several tutorials?

from spatialdata.datasets import blobs; sdata = blobs().

2
New cards

Can a Shapes or Points element be annotated directly, without a Table?

Yes โ†’ by simply adding extra columns to the GeoDataFrame/DataFrame.

3
New cards

Can a Labels element be annotated directly?

No โ†’ Labels have no natural per-instance row, so a Table is required.

4
New cards

How are a Labels element's instance indices identified?

Via get_element_instances(), which computes the unique non-zero pixel values.

5
New cards

Can Images be annotated by a Table at all?

No โ†’ Images have no index; but a table with no annotation target can still be used to annotate channel-level information.

6
New cards

Where exactly do a table's region, region_key, instance_key metadata live?

region_key and instance_key values live in two table.obs columns; the trio itself is recorded in table.uns["spatialdata_attrs"]

7
New cards

Is a table's own row index (not obs columns) ever used for the spatial link?

No โ†’ the region link relies entirely on the instance_key column's values, never the table's own index

8
New cards

What function returns (region, region_key, instance_key) for a table?

get_table_keys(table)

9
New cards

What function changes which element a table annotates?

sdata.set_table_annotates_spatialelement("table_name", region="new_element")

10
New cards

What does the match_rows argument control?

Whether output rows follow the SpatialElement's index order ("left") or the table's order ("right") โ†’ default is "no" (no reordering).

11
New cards

What join restriction applies specifically to Labels elements?

Only the left join is supported, with match_rows limited to no or left โ†’ because masking individual label pixels for other join types would be expensive.