Fix OME-Zarr physical scale metadata#845
Conversation
|
@maxliebscher is attempting to deploy a commit to the scroll Team on Vercel. A member of the Team first needs to authorize it. |
|
Quick note on the Vercel check: this PR only touches volume-cartographer C++/CMake test code. I validated the affected path locally in WSL2 by building |
755bc16 to
7f9872f
Compare
7f9872f to
d40e177
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d40e177bf8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const cv::Size& canvasSize, size_t CZ, size_t CH, size_t CW, | ||
| double baseVoxelSize = 1.0, | ||
| double zVoxelSize = 1.0, | ||
| double yxVoxelSize = 1.0, |
There was a problem hiding this comment.
Preserve existing writeZarrAttrs call sites
With yxVoxelSize inserted before voxelUnit, existing callers that pass only a voxel size and unit no longer compile: I checked repo-wide with rg "writeZarrAttrs\\(", and volume-cartographer/core/test/test_zarr.cpp:119 still calls writeZarrAttrs(..., 7.91, "um"), so the string literal is now bound to this new double parameter. Building the normal test_zarr target will fail unless that call is updated or a compatibility overload keeps the old (baseVoxelSize, voxelUnit) form working.
Useful? React with 👍 / 👎.
Summary
Fixes OME-Zarr physical scale metadata written by
vc_render_tifxyzso rendered output stores the actual physical spacing for the generated Z/Y/X axes.What changed
writeZarrAttrsnow accepts separate physical sizes for Z and Y/X instead of one isotropic base voxel size.vc_render_tifxyzcomputes output Y/X spacing from the selected source group and--scale.--slice-stepand remains unchanged across output pyramid levels.Why
The previous metadata path used one base voxel size for all output axes and levels. That loses the distinction between:
This can make downstream OME-Zarr consumers interpret rendered volumes with the wrong physical scale.
Validation
Rebased onto current
mainand ran in WSL2 Ubuntu 24.04:Result:
The generated build directory was removed after verification.