Repository navigation
support 5D images but only if T=1, which means it is dropped - #1288
Open
callum-jpg wants to merge 1 commit into
Open
callum-jpg wants to merge 1 commit into
callum-jpg wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Dynamic Cell Atlas (DCA) spec defines a standard for storing microscopy datasets. An aspect of this is that all images are stored as 5D arrays, which SpatialData does not support the loading of. This PR adds support for loading of images where
T=1by dropping that dimension. If T>1, it returns an error.Additionally, this PR also adds in the OME-Zarr 0.5 key to
sdata_zarr_version_to_ome_zarr_formattoo, which is down to the fact that we use an external writer that is compliant with OME-Zarr 0.5.While this PR offers a quick fix for our immediate data needs I think the eventual alignment with OME will fix the latter problem.
As for the 5D image loading case, I'm not sure of an alternative, or if dropping T=1 is even a precedent you wish to set in SpatialData. I had thought about a load-time hook, but this would mean changing args to
spatialdata.read_zarreverywhere, even in a third party package (eg. SOPA).While this PR assumes that T=1, there has been a request for time support here: #247. If that's implemented, T would be handled natively and this fix would no longer be needed.
Also, OME-Zarr lets an image omit the multiscale-level
coordinateTransformationsentry, where spatialdata records an image's position in space.read_zarrused to fail on such image but now it places them unchanged in the default global coordinate system. This is the cause of the test failures.