Conversation
OME-NGFF 0.6 requires the input/output of coordinate transformations to be
JSON objects {"name": ..., "path": ...}. The v0.6 model stored them as
strings, squashing objects into "path#name" on read and writing strings
back, so reading a conformant file and saving it corrupted it. Scale levels
created via createScaleLevel also lacked the mandatory dataset input/output.
- Add CoordinateSystemRef (name/path, NON_NULL) and use it for input/output
on all v0.6 transformations; factory methods take CoordinateSystemRef and
gain ref-less scale/translation and a sequence factory.
- Legacy pre-release string refs are still read: a bare string is a name,
except for the input of a dataset transformation, which is the dataset
path; "<path>#<name>" strings from earlier zarr-java are split. Writing
always emits the object form.
- createScaleLevel writes input {"path": <level>} and output
{"name": <intrinsic>} (from existing datasets, else first coordinate
system; ZarrException if neither). Multiple transformations are wrapped in
a sequence whose nested transformations carry no refs; getMultiscaleNode
flattens such sequences back to [scale, translation].
- Scene graph resolution works on CoordinateSystemRef.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 v0.6 model was built against the 0.6 dev drafts, where transform
input/outputwere strings. The final 0.6 spec requires objects{"name": ..., "path": ...}.Problem
"path#name"strings and wrote them back that way, so saving a conformant file corrupted it (e.g.{"name":"physical","path":"imgA"}→"imgA#physical").createScaleLevel(...)wrote dataset transforms with noinput/outputat all.Changes
CoordinateSystemRef(name,path) used forinput/outputon all v0.6 transforms. Writing always emits the object form.createScaleLevelwritesinput: {"path": <level>}andoutput: {"name": <intrinsic>}. Several transforms are wrapped in onesequence, as the spec requires.input, which is read as the path;"path#name"strings are split.Breaking (experimental package):
getInput()/getOutput(), constructors and thescale/translation/identityfactories now takeCoordinateSystemRefinstead ofString.Tests
New
OmeZarrV06CoordinateSystemRefTest(spec JSON round-trips,createScaleLeveloutput, legacy fixtures) plus updated tests.mvn test -Dtest='OmeZarr*Test,OmeObjectMappersTest': 84 tests, 0 failures.Related: #109 (preserve dropped metadata fields). Whichever merges second needs a small rebase.
🤖 Generated with Claude Code