feat: add support for input/output in ome transforms as object - #1100
Open
seankmartin wants to merge 4 commits into
Open
feat: add support for input/output in ome transforms as object#1100seankmartin wants to merge 4 commits into
seankmartin wants to merge 4 commits into
Conversation
Previously from RFC it was a string, where the string could be the name or the path and based on the location of the transform the appropriate meaning was inferred. This has changed in the ome spec and this commit is to update that in neuroglancer's support. In addition it also adds a new way of finding the intrinsic coordinate space. Since the ome spec now includes a way to determine the intrinsic space as the space that is named as the output of each transform in the multiscales, we can iterate the names to verify all have the same output name - and if so, use that as the intrinsic space. Since the spec recommends viewers use this space unless instructed otherwise, neuroglancer can now use this space instead of assuming the last coordinate space listed is the intrinsic one.
Contributor
|
can you add a test to ome.spec.ts for this? |
If multiscales.coordinateTransformations is present, then our final coordinateSystem is the output of the final transform in the array of transforms. If only multiscales.datasets is present, then instead it is the intrinsic coordinateSpace, inferred from the names of the output of the transforms (which must be the same at each scale)
Contributor
Author
Yes I added a test and updated a few others to better reflect the status of the transforms spec |
seankmartin
marked this pull request as ready for review
August 27, 2026 13:10
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.
Previously from the transforms RFC the
input/outputfield of a transform was a string, where the string could be the name or the path and based on the location of the transform the appropriate meaning was inferred. This has changed in the ome spec so that theinput/outputis an object withnameandpathas optional strings. Generally speaking only one ofnameandpathis intended to be filled for eachinput/output. For example, thepathis expected to be filled on theinputwhilenameis expected to be filled on theoutputof transforms inside ofmultiscales.datasets. This PR is to update support in neuroglancer for that.We continue to allow strings because we support version
0.6.dev1which was built to the old spec. If there is a string input or output, we interpret that as an object withnameandpathboth filled in to the value of the provided string. Because of this we also remain slightly looser than some of the MUST clauses in the spec around input and output, because of how we implemented the initial support. In summary this leaves us compliant when provided valid metadata, and we do verify a lot of the key metadata for correctness, but we don't enforce compliance with some MUST clauses for every part of the spec.In addition it also adds a new way of finding the intrinsic coordinate space and output coordinate space. Since the ome spec now includes a way to determine the intrinsic space as the space that is named as the output of each transform in the multiscales.datasets, we can iterate the names to verify all have the same output name - and if so, use that as the intrinsic space.
We don't follow the recommendation from the spec (not a MUST) that suggests viewers to use the intrinsic space unless instructed otherwise. Since we don't have a coordinateSpace selector, we follow the existing code in neuroglancer which applies the
multiscales.coordinateTransforms, if present, in order. So our output coordinateSpace is the intrinsic space ifmultiscales.coordinateTransformsis not present. Otherwise it is the coordinateSpace which has the same name as theoutputfrom the last transform inmultiscales.coordinateTransforms- which may be the intrinsic space still.