Skip to content

spatialdataR for Fractal (OME-Zarr) output #212

@csoneson

Description

@csoneson

Hello - as discussed at CSAMA this week, I'm exploring the possbility to use spatialdataR for microscopy OME-Zarr files processed (for example) by Fractal. My testing is based on the file here: https://zenodo.org/records/10519143 which we are also using in the ez-zarr vignette.

When attempting to read the file, I ran into two issues, related to:

  • the location of the version information
  • the fact that the image is 4D (czyx)

The first issue could be solved by checking for the version in different locations (specifically x$omero$version or x$multiscales[[1]]$version) in

v <- x$spatialdata_attrs$version

The second issue I currently solved by removing the z-dimension in .readArray() if it's present and of length 1 (and failing otherwise), but here I think the solution will depend on whether you'd like to be able to also handle 3D images in a more sophisticated way.

With these fixes, I could read the file. Now trying to plot it with SpatialData.plot() fails because CTname(img) returns an empty vector.

Happy to discuss further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions