Update ZarrPixelBufferTest to use bioformats2raw 0.11.0 native features#36
Conversation
- 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
8476044 to
c73fab7
Compare
melissalinkert
left a comment
There was a problem hiding this comment.
Generally 👍, just some minor cleanup that could be done here or in a follow-up PR.
src/test/java/com/glencoesoftware/omero/zarr/ZarrPixelBufferTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/glencoesoftware/omero/zarr/ZarrPixelBufferTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/glencoesoftware/omero/zarr/ZarrPixelBufferTest.java
Outdated
Show resolved
Hide resolved
| 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"); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Got it, that makes sense.
Discussed with @dominikl and @melissalinkert as part of the weekly OME Formats meeting, this upgrades the test infrastructure of
omeor-zarr-pixel-bufferto benefit from the new functionalities introduced in https://github.com/glencoesoftware/bioformats2raw/releases/tag/v0.11.0 notably for generating 2D-5D OME-Zarr datasetscom.glencoesoftware:bioformats2rawtest dependency from 0.9.1 to 0.11.0ZarrPixelBufferTest.writeTestZarrZarrPixelBufferTest.assertBioFormats2Rawto pass optionsresolutionsinZarrPixelBufferTest.writeTestZarrin favor of--resolutionsoption--compactoption for testing Zarr datasets with 2D-5D dimensionsbioformats2raw --compactbioformats2raw --chunk-depthIncidentally, the usage of the converter utility should reduce the execution of the unit tests from ~50s to ~13s.