spatialdata icon indicating copy to clipboard operation
spatialdata copied to clipboard

Respect xarray coordinates for ImageContainers

Open conradfoo opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Currently, if I parse an xarray DataArray into an image container, the coordinates are overwritten with pixel coordinates even if I do not specify a transformation.

Describe the solution you'd like Transfer over the xarray coordinates from the initial xarray into the spatialdata object

Describe alternatives you've considered It is possible (but annoying) to construct a transformation object from my coordinate list and feed that into the constructor.

Additional context I'm using spatialdata-0.2.3 Thanks!

conradfoo avatar Oct 03 '24 15:10 conradfoo

Hi @conradfoo, thanks for reporting.

We actually want to implement this feature. Tracked here https://github.com/scverse/spatialdata/issues/308 (in "there will be a helper function to convert back and forth between BaseTransformation (and so also NGFFBaseTransformation) and xarray coordinates."). I will increase the priority of this feature request.

LucaMarconato avatar Oct 03 '24 15:10 LucaMarconato

Hi Luca, thanks for the quick response! Nice to know it is already being worked on =)

conradfoo avatar Oct 08 '24 17:10 conradfoo

Closed due to overlap with other feature requests

conradfoo avatar Oct 08 '24 17:10 conradfoo

Closed due to overlap with other feature requests

I'll reopen this even if it's tracked elsewhere because I'll fix this first than all the other items of the linked issue. Also in this way you will be notified about progress.

LucaMarconato avatar Oct 09 '24 12:10 LucaMarconato