Get elements in a coordinate sytem
Hi, There maybe several coordinate systems in a spatialdata object, each has some elements. For example:
global: morphology_focus (Images), cell_labels (Labels), nucleus_labels (Labels), transcripts (Points), cell_boundaries (Shapes), cell_circles (Shapes), nucleus_boundaries (Shapes)
my_other_space: my_cell_lables, my_transcipts2, my_circles2
we can only get the names of coordinate systems by sdata.coordinate_systems, is there a way to get elements names of each coordinate_systems ?
Hi, we don't have such a function, but it's very quick to write that code. For instance you can find it here: https://github.com/scverse/spatialdata/blob/d463376abba64828bfbefed569fb7e2a7c929db7/src/spatialdata/_core/spatialdata.py#L642 or here: https://github.com/scverse/spatialdata/blob/d463376abba64828bfbefed569fb7e2a7c929db7/src/spatialdata/_core/spatialdata.py#L1868.
We could turn this into one API at some point, but I'd suggest to use one of the implementation above for now.