Skip to content

[ENH] Add OME-Zarr as a supported format for imaging data#2392

Open
kabilar wants to merge 14 commits intobids-standard:masterfrom
kabilar:omezarr
Open

[ENH] Add OME-Zarr as a supported format for imaging data#2392
kabilar wants to merge 14 commits intobids-standard:masterfrom
kabilar:omezarr

Conversation

@kabilar
Copy link
Copy Markdown
Member

@kabilar kabilar commented Apr 13, 2026

@kabilar
Copy link
Copy Markdown
Member Author

kabilar commented Apr 14, 2026

I fixed most of the CI failures. The remaining 2 failures appear unrelated.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.07%. Comparing base (308395f) to head (827e536).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2392   +/-   ##
=======================================
  Coverage   83.07%   83.07%           
=======================================
  Files          22       22           
  Lines        1696     1696           
=======================================
  Hits         1409     1409           
  Misses        287      287           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@effigies effigies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support this. It is in line with the decision made at the Copenhagen 2023 meeting which was: HDF5 and Zarr are preferred formats for new multi-dimensional data.

It looks like we dropped the ball on the wording in #1614, but I do think the decision should hold, nonetheless.

Comment thread src/common-principles.md
Spatial metadata (such as the axis names and units, and coordinate transformations) SHOULD
be stored within the OME-Zarr metadata following the
[OME-Zarr version 0.5 specification](https://ngff.openmicroscopy.org/specifications/0.5/index.html)
(the latest released version).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought to scream "duplication is evil!" but apparently we do not really disclose much in microscopy section about OME or NGFF

❯ git grep -i -e OME.Zarr -e ngff -- src/modality-specific-files/microscopy.md
src/modality-specific-files/microscopy.md:file's header. Further, OME-ZARR (sometimes referred to as OME-NGFF or NGFF) has been developed to provide improved
src/modality-specific-files/microscopy.md:-   [OME-ZARR/NGFF](https://ngff.openmicroscopy.org/latest/) (`.ome.zarr` directories)

but then we should at least take an opportunity to point to this section here from within that microscopy.md section. attn @bids-standard/bep031

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I have just pushed a commit.

Comment thread src/common-principles.md Outdated
Comment thread src/common-principles.md
compressed NIfTI files (.nii.gz), either version 1.0 or 2.0. If using compressed files,
Imaging data SHOULD be stored using the NIfTI file format.
Large imaging data MAY instead be stored using the
[OME-Zarr (OME-NGFF)](https://ngff.openmicroscopy.org/) file format.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if some schema-level check /could/should be added here based on some characteristics of the volume(s) -- e.g. any dimension having over 1k elements?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could: yes

checkname:
  issue: ...
  selectors:
    - type(nifti_header) != 'null'
  checks:
    - max(nifti_header.shape) <= 1000

Should: 🤷🏻

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I don't feel too strongly here, but if we do add a check let's use level: warning.

Comment thread src/common-principles.md Outdated
@kabilar kabilar requested a review from yarikoptic April 21, 2026 04:26
@yarikoptic
Copy link
Copy Markdown
Collaborator

That's shaping up nicely! Please complement with a PR against bids-examples which would demo some fake dataset with .ome.zarr . FWIW -- here I am creating one but scripting so I could easily recreate etc

@kabilar
Copy link
Copy Markdown
Member Author

kabilar commented Apr 22, 2026

That's shaping up nicely! Please complement with a PR against bids-examples which would demo some fake dataset with .ome.zarr . FWIW -- here I am creating one but scripting so I could easily recreate etc

Thanks @yarikoptic. There was already a bids-examples dataset with an .ome.zarr so I pushed a commit that references it.

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.

Allow OME-Zarr for non-microscopy data

3 participants