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.
Hello - as discussed at CSAMA this week, I'm exploring the possbility to use
spatialdataRfor 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 first issue could be solved by checking for the version in different locations (specifically
x$omero$versionorx$multiscales[[1]]$version) inspatialdataR/R/sdAttrs.R
Line 130 in 175f1d8
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 becauseCTname(img)returns an empty vector.Happy to discuss further.