Skip to content

Update ZarrPixelBufferTest to use bioformats2raw 0.11.0 native features#36

Merged
sbesson merged 5 commits intoglencoesoftware:masterfrom
sbesson:bf2raw_0.11.0
Sep 25, 2025
Merged

Update ZarrPixelBufferTest to use bioformats2raw 0.11.0 native features#36
sbesson merged 5 commits intoglencoesoftware:masterfrom
sbesson:bf2raw_0.11.0

Conversation

@sbesson
Copy link
Copy Markdown
Member

@sbesson sbesson commented Sep 24, 2025

Discussed with @dominikl and @melissalinkert as part of the weekly OME Formats meeting, this upgrades the test infrastructure of omeor-zarr-pixel-buffer to benefit from the new functionalities introduced in https://github.com/glencoesoftware/bioformats2raw/releases/tag/v0.11.0 notably for generating 2D-5D OME-Zarr datasets

  • bump com.glencoesoftware:bioformats2raw test dependency from 0.9.1 to 0.11.0
  • remove metadata edition in ZarrPixelBufferTest.writeTestZarr
  • update ZarrPixelBufferTest.assertBioFormats2Raw to pass options
  • remove resolutions in ZarrPixelBufferTest.writeTestZarr in favor of --resolutions option
  • use --compact option for testing Zarr datasets with 2D-5D dimensions
  • remove the TestZarr class (introduced in Extended axes support #28) superseded by bioformats2raw --compact
  • add unit test reading 3D chunks created with bioformats2raw --chunk-depth

Incidentally, the usage of the converter utility should reduce the execution of the unit tests from ~50s to ~13s.

@sbesson sbesson changed the title Update ZarrPixelBuffer to use bioformats2raw 0.11.0 native features Update ZarrPixelBufferTest to use bioformats2raw 0.11.0 native features Sep 24, 2025
- bump com.glencoesoftware:bioformats2raw test dependency from 0.9.1 to 0.11.0
- remove metadata edition in ZarrPixelBufferTest.writeTestZarr
- update ZarrPixelBufferTest.assertBioFormats2Raw to pass options
- remove resolutions in ZarrPixelBufferTest.writeTestZarr in favor of --resolutions option
- use --compact option for testing Zarr datasets with 2D-5D dimensions
- remove the TestZarr class superseded by bioformats2raw --compact
- add unit test reading 3D chunks created with bioformats2raw --chunk-depth
Copy link
Copy Markdown
Member

@melissalinkert melissalinkert left a comment

Choose a reason for hiding this comment

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

Generally 👍, just some minor cleanup that could be done here or in a follow-up PR.

sizeT, sizeC, sizeZ, sizeY, sizeX, "uint16",
resolutions);
Pixels pixels = new Pixels(null, null, sizeX, sizeY, sizeZ, sizeC, sizeT, "", null);
Path output = writeTestZarr(sizeT, sizeC, sizeZ, sizeY, sizeX, "uint16");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here and in several other places through line 744, the resolution count is no longer explicitly set when calling writeTestZarr. The default resolution count should be 4 for this image size if nothing else is selected - was this change intentional?

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.

Sorry I should have expanded on that. Prior to this change, bioformats2raw was writing a default number of resolutions based on the maximum size and target min size first and the multiscales metadata was overwritten using getDatasets(resolutions). In practice this means we were testing Zarr datasets with internal inconsistencies.

I have opted for letting bioformats2raw write its default number of resolutions in most cases and only specify --resolutions when a unit test includes resolution checks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it, that makes sense.

@sbesson sbesson merged commit 3a6e0a4 into glencoesoftware:master Sep 25, 2025
6 checks passed
@sbesson sbesson deleted the bf2raw_0.11.0 branch October 23, 2025 09:27
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.

2 participants