hms-dbmi / vizarr

A minimal Zarr image viewer based on Viv.
https://hms-dbmi.github.io/vizarr/?source=https://minio-dev.openmicroscopy.org/idr/v0.3/idr0062-blin-nuclearsegmentation/6001240.zarr
MIT License
114 stars 16 forks source link

Is it possible to use vizarr for visualizing high-resolution streaming images? #121

Closed jmontoyam closed 2 years ago

jmontoyam commented 3 years ago

Hi,

first of all, thank you very much for making this amazing project open-source! ;). I just watched a video that explains vizarr (Lighting Talk - OME NGFF and Viv - Trevor Manz (HMS)), and I really liked it!, amazing project!. I am a Python user, with a very basic JavaScript level (beginner, but eager to learn more about JS and web technologies). In my use-case, I am interested in creating a web application that allows to visualize high-resolution streaming images acquired by an xray system (the server) while scanning objects on a moving conveyor belt. I would like to visualize the streaming raw images as the acquisition systems writes them to disk to check that the experiment is going well and the images are acquired as expected. Every "dt" milliseconds the acquisition systems acquires and writes to disk a new image (tiff format) of dimension 64 x 10240. The number of images acquired during an experiment is variable (it could be thousands, tens-of-thousands, or even millions, it depends on the duration of the experiment). Following the description available in the video mentioned above, I am planning extending the acquisition systems such that not only write the raw images to disk, but also generate the zarr tiles to be used by vizarr. At any given moment, the user can interact with the viewer (zoom-in/out, panning, etc), while the acquisition system continues streaming the new data. Do you guys think is it possible to use vizarr to accomplish such goal?

Thank you very much!

All the comments, suggestions and advices are truly welcome ;).

will-moore commented 2 years ago

Hi @jmontoyam When I'm using https://github.com/ome/omero-cli-zarr to export OME-NGFF from OMERO, this creates the image metadata and zarr array at the start of the export, then iterates through all the image planes and writes them to disk. See https://github.com/ome/omero-cli-zarr/blob/42c56419d68a7e17d5e424222c6596b35cc1d1ba/src/omero_zarr/raw_pixels.py#L33

The export can take a while, but even while it's in progress, I can view the image in vizarr. However, this does rely on knowing the full dimensions (X, Y, Z, C, T) of the Image at the start.