Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Fix zero-sized slicing and improve test coverage #49

Merged

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.
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.

test/CMakeLists.txt Show resolved Hide resolved
@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
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
18 checks passed
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