Skip to content

Conversation

@tbirdso
Copy link
Collaborator

@tbirdso tbirdso commented Aug 11, 2023

Addresses issue where time and channel slice sizes were set to zero instead of one. The result of this issue was such that reading from stores with time or channel axes returned correct metadata but all-zero-valued image buffers.

This issue slipped by because I was testing for metadata and voxel array shape correctness, but not the actual content of the images that were produced. I have overhauled testing to cover this case and prevent similar regressions in the future:

  • Added baseline images for all HTTP tests and refactored to rely on ITKTestDriver's image comparison for metadata and buffer content correctness at the end of each test.
  • Added test to verify that we can read from a small local t,y,x zarr store with two time frames and validate that each frame has correct metadata and image content.

Also adds optional debugging output to OMEZarrNGFFImageIO to help decipher ITK/tensorstore mismatch issues in the future.

Fixes an issue where Tensorstore would allow reading a slice of size
zero into an empty array buffer, with the result being an array of all
zeros.
Adds more verbose printouts to help with debugging and logging
Adds tests to read 2D frames from a contrived 2D+time OME-Zarr test
image.

Tests include output comparison in MetaImage format to capture metadata
and voxel equivalence.
Adds baseline MetaImage comparisons for HTTP tests at various resolution
levels.

Provides coverage to validate both metadata and voxel agreement with
baseline.
@tbirdso tbirdso requested review from dzenanz and thewtex August 11, 2023 18:17
Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Mostly looks good.

@tbirdso
Copy link
Collaborator Author

tbirdso commented Aug 11, 2023

I am able to reproduce test failures on my Linux machine. Will investigate.

Removes metadata validation from HTTP tests. Both metadata validation
and image buffer validation are now covered under baseline image
comparison after the test body completes.
@tbirdso tbirdso force-pushed the zero-valued-slicing-fix branch from 50b55d2 to 3d6984e Compare August 13, 2023 16:34
@tbirdso
Copy link
Collaborator Author

tbirdso commented Aug 13, 2023

Tests are passing after addressing a small test build warning. (had incorrectly marked a test function with bool return type when it should have been void.)

Moving forward with merge.

@tbirdso tbirdso merged commit 07e53d2 into InsightSoftwareConsortium:master Aug 13, 2023
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.

3 participants