InsightSoftwareConsortium/itkwidgets

Improper intermediate downscale spacing

tbirdso opened this issue · 2 comments

Overview

Observed an issue where itkwidgets.view(image) with three levels shows incorrect spacing for Level 1, while Level 0 and Level 2 appear correctly.

Level 0 (original image)

scale0

Level 1 (improper scale, pancake image)

scale1

Level 2 (apparently correct scale, lowest resolution)

scale2

Versions

itkwidgets[all]==1.0a32
itk==v5.3.0

Steps to Reproduce

3D image file: https://drive.google.com/file/d/1rKB7a65EIPvtNYclea1C7cvOhGhbCG_0/view?usp=share_link

itkwidgets.view(image)

Additional Notes

Unclear whether the image itself is downsampled with the wrong spacing or if the issue is limited to viewing. The fact that the subsequent level is correctly scaled seems to imply a viewing issue?

cc @thewtex @PaulHax

Note that this behavior appeared to be visible in ngff-zarr in Exercise 1(?) during the GYBT multiscale tutorial:

https://github.com/InsightSoftwareConsortium/GetYourBrainTogether/blob/main/HCK02_2023_Allen_Institute_Hybrid/Tutorials/LargeScaleRegistration/Multiscale_Spatial_Metadata_and_Distributed_Processing.ipynb

EDIT: Behavior may have been due to the size of the matplotlib pyplot view rather than improper image size in space. May be
worth investigating to confirm.

I was able to recreate the issue in neuroglancer, it appears that the origin is in ngff-zarr rather than itkwidgets. I have cross-posted the issue there with neuroglancer details: thewtex/ngff-zarr#33