vizarr icon indicating copy to clipboard operation
vizarr copied to clipboard

[wip] Experiment with multiscale grid

Open manzt opened this issue 4 years ago • 3 comments
trafficstars

This PR replaces the sublayers in gridLayer.ts with MultiscaleImageLayer and uses a projection matrix to translate each grid item. For large grids, my computer chokes, but for smaller grids (like "wells") it seems to work quite well.

The Added benefit is that grid items load can load independently.

https://user-images.githubusercontent.com/24403730/109747966-0bf00900-7ba6-11eb-9468-d7f63afe4d7c.mov

https://user-images.githubusercontent.com/24403730/109748005-1c07e880-7ba6-11eb-8bba-96463dbbd4b0.mov

@will-moore This uses implements the metadata reuse i mentioned in #75. I think finding a heuristic for when a grid is "too big" is probably the right path forward.

manzt avatar Mar 03 '21 03:03 manzt

demo: https://deploy-preview-80--vizarr.netlify.app/?source=https://s3.embassy.ebi.ac.uk/idr/zarr/v0.1/plates/2551.zarr

manzt avatar Mar 03 '21 03:03 manzt

Hi, the asyn loading of Wells is nice. Certainly for the whole plate demo, the zooming is a bit painful compared to the current viewer. Which is a shame as the functionality of loading higher resolution tiles as you zoom in is exactly what is wanted. It works fine on the smaller grids of images (single Well).

NB: I don't know if you're following https://github.com/ome/ngff/issues/31 ? Discussion about changing the way the OME-Zarr spec for collections of images (e.g. a Plate), but that will affect vizarr. E.g. If all images are in a single Plate container, could something like source=/path/to/plate.zarr#A1 work for opening a Well?

will-moore avatar Mar 04 '21 17:03 will-moore

Certainly for the whole plate demo, the zooming is a bit painful compared to the current viewer. Which is a shame as the functionality of loading higher resolution tiles as you zoom in is exactly what is wanted. It works fine on the smaller grids of images (single Well).

I might try the non-multiscale image layer from Viv for large plates, and then default to multiscale for plates that are small enough (question is what hueristic to use for "small enough"). Benefit here is that loading would be async regardless.

NB: I don't know if you're following ome/ngff#31 ? Discussion about changing the way the OME-Zarr spec for collections of images (e.g. a Plate), but that will affect vizarr. E.g. If all images are in a single Plate container, could something like source=/path/to/plate.zarr#A1 work for opening a Well?

Haven't been following this, thanks for pointing me to it. I don't think this would work currently in vizarr, but if there ends up being a change, I would probably just update vizarr to handle whatever that is. I have cut two released of vizarr v0.1 and v0.2, which will handle the old specification, and we can migrate a new version to mirror the current spec. Since OME-Zarr is still being developed, I'd like the current version of vizarr to be free of backward compatibility constraints.

manzt avatar Mar 04 '21 17:03 manzt