scverse / spatialdata

An open and interoperable data framework for spatial omics data
https://spatialdata.scverse.org/
BSD 3-Clause "New" or "Revised" License
236 stars 45 forks source link

Coordinate transformations refactoring #308

Open LucaMarconato opened 1 year ago

LucaMarconato commented 9 months ago

The new coordinate transformations system is explained in this talk https://youtu.be/7HzMn_ooJmk?t=1391 from minute 23:11 to 31:45.

Pragmatically, it requires the following:

Data model

APIs

File format

Release

CC @melonora

LucaMarconato commented 8 months ago
LucaMarconato commented 8 months ago

I am not sure if deepcopy() for SpatialImages will preserve the xarray coordinates, my guess it's that it will reset the xyz coordiantes (the c are passed explicitly); multiscale spatial image currently doesn't call the parser so it should be fine.

LucaMarconato commented 2 months ago

The NGFF transformations specification is going to be merged within a few months! While reviewing the respective RFC, I will list in this comment all the points that needs to be addressed from the spatialdata side to ensure full compliance. These points could be addressed as part of a PR for this issue, or a follow-up/pre PR.

coordinate systems

axes

intrinsic coordinate system

pixels

coordinate transformations: missing implementations

Implementations are required only to work with Identity, Translation and Scale, so we do not need to implement the following. Still, listing all the points here for completeness.

coordinate transformations: main major points

The points in this paragraph require some deep changes that maybe it's worth to make directly in a package upstream rather than in the spatialdata.

coordinate transformations: other major points

coordinate transformations: other minor details

coordinate transformation, verify that we are compliant

things that need to be clarified