Skip to content

Fix the registration demos after #51: axis types and arrays without attributes - #52

Merged
davidackerman merged 1 commit into
mainfrom
fix/browser-axes
Oct 22, 2026
Merged

davidackerman merged 1 commit into
mainfrom
fix/browser-axes

Conversation

@davidackerman

Copy link
Copy Markdown
Member

Fixes two regressions that #51 introduced in the browser engine's registration demos.

  • Fly brain demo: "Cannot read properties of undefined (reading '_ARRAY_DIMENSIONS')". The example's arrays have no attributes of their own, and zarrita gives attrs as undefined for them. placeZarr read attrs._ARRAY_DIMENSIONS without allowing for that. placeZarr, openImage and the zarr array source now treat missing attributes as none.

  • EASI-FISH demo: the moving round appeared out of place. openImage used to keep each OME axis's type; worldarray 0.3: served metadata, chunk keys and the browser reader #51 built the axes from name and unit only. The register page writes moving.axes into the OME metadata of its before/after views, so t and c were served untyped, and Neuroglancer stopped treating them as time and channel. The placement itself was unchanged.

    The typing rule worldarray uses (axisTypes, with TO_SECONDS) moves to placement.ts, and both layout.ts and openImage now use it, so images carry time, channel and space again.

Checked under Node on the demos' real metadata (the brain example's local copy, and the two EASI-FISH rounds' documents from S3): openImage now returns the same axes, types, scales and shifts as before #51, while main as merged reproduces both symptoms. A test in web/test/metadata.test.ts covers an array with no attributes and the axis types.

…no attributes of their own, both broken in #51: openImage built axes from name and unit alone, so the register page's before and after views served t and c untyped and Neuroglancer read them as space (the EASI-FISH demo's moving round out of place), and an array zarrita gives no attrs (the fly brain demo's) failed on _ARRAY_DIMENSIONS; the axis typing worldarray uses (axisTypes) and TO_SECONDS move to placement.ts, shared by layout.ts and openImage, and placeZarr, openImage and a zarr array's source take missing attributes as none; a test of both
@davidackerman
davidackerman marked this pull request as ready for review October 22, 2026 22:29
@davidackerman
davidackerman merged commit 1dc6d53 into main Oct 22, 2026
2 checks passed
@davidackerman
davidackerman deleted the fix/browser-axes branch October 22, 2026 22:29
@davidackerman davidackerman mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant