-
Notifications
You must be signed in to change notification settings - Fork 18
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
Handle Z-downsample. #71
Conversation
We need to set the selection[zIndex] to be within the bounds of shape[zIndex] for the current resolution level
Cool to see progress on this!
Looking forward to it! |
Sample data is available at https://minio-dev.openmicroscopy.org/idr/idr0077-valuchova-flowerlightsheet/zscale_01/9836831.zarr/zscale Same data without the Z-downsampling is at https://minio-dev.openmicroscopy.org/idr/idr0077-valuchova-flowerlightsheet/zscale_01/9836831.zarr |
@manzt @will-moore A question - will there be any way to distinguish between the downsampled-in-z version of a dataset and the non-downsampled version? The |
@ilan-gold Good question, thanks. But all still to be decided.... |
Now that the build is passing, this is deployed at https://deploy-preview-71--vizarr.netlify.app/?source=https://minio-dev.openmicroscopy.org/idr/idr0077-valuchova-flowerlightsheet/zscale_01/9836831.zarr/zscale cc @joshmoore |
Seems like the background image to the mutliscale image is a problem here @will-moore @manzt. One option would be a parameter for allowing you to turn off the background image, but it feels like it should be resolvable from the loader itself as well. |
One thing I'm noticing in the demo is that moving the z-slider while zoomed in seems to load data for a lower resolution. I'm not sure what's going on exactly. Screen.Recording.2021-01-18.at.9.57.10.PM-1.mov |
@manzt I'm also seeing the loading of low-resolution data before these Z-downsample changes. E.g. |
@will-moore @manzt If it's the background image that is giving you issues, we recently released the option to turn it off in |
I'm guessing this is right. I'll have to look closer. |
Our loaders have diverged a bit since this PR. We are not experimenting with this in Viv so I'm going to close: hms-dbmi/viv#478. Thank you for pushing this effort forward! |
This uses the fix suggested by @manzt at #60 to handle Pyramids where each level is downsampled in Z (as well as X and Y).
I have also overridden
ZarrLoader.getRaster()
as well asgetTile()
.In addition to the suggested fix, I also needed to set the selection[zIndex] to be within the bounds of shape[zIndex] for the current resolution level.
This doesn't change the vizarr UI. The Z-slider still has the full number of steps, even when you're viewing a resolution level that has a smaller number of Z-sections. E.g. if the downsample factor in Z is 2, then level 1 will have size-Z / 2 and the image will only change for every 2 steps of the Z-slider (although we load the data each time) which is not optimal but I don't know how to update the size-Z and Z-slider while you're zooming from one resolution to the next, and at least this works.
Tested with data generated as at ome/ome-zarr-py#71 (comment)
I'll try and get that data to be publicly available for testing ASAP.