-
Notifications
You must be signed in to change notification settings - Fork 46
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
High Content Screening #630
base: main
Are you sure you want to change the base?
Conversation
…aders if no loader has been passed in
@s-n-i As a start, I would want a layer that does this, not a viewer. @manzt has expressed opposition to having this in the core of viv, and I completely understand his point, so I to would lean towards "no" (see #287) EDIT: maybe he hasn't? I seem to remember agreeing that the core of Viv was not meant for this but maybe not. That being said, how long does the above screenshot take to load? If you had some contribution that allowed super fast loading or interaction (both of which have been challenges in the past from what I remember), I think then we might be more interested in that since others (i.e |
@ilan-gold I tested how long loading 16 plates takes. The application starts with only one plate in the viewport. It takes about 3 seconds to load it. It takes 2 seconds to zoom out and load the remaining 15 plates. Only plates that are within the viewport get loaded. I am not serving the datasets locally, so network speed has an effect. With this implementation, when loading 16 plates, I am not noticing any rendering performance problems. When displaying around 100 plates, the performance is noticeably slower, but still usable. Our approach to fast loading and interaction with hundreds of plates involves generating small top levels for these pyramids, with the highest level being 1 pixel in size, discussed in #620. |
Relatedly @s-n-i - why are you maintaining a fork? Just curious, are you using Avivator as your viewer? @manzt maybe it would be worth releasing Avivator as a package too i.e a giant React component? And allow people to pass in a high level prop for layers or something? Maybe we need more use-cases for this... |
I think this is beyond the scope of Viv. The React components are already intended to be extensible, and this would open up lots of additional development burden with having to maintain and document an additional API. |
So @s-n-i I am not sure how @manzt feels, but a very generic
Thanks @s-n-i ! |
I am maintaining a viv fork because it appeared to be the most efficient way to implement the functionality to load multiple plates. Please let me know, if an alternative approach could be better. I am using a modified version of Avivator as the viewer, so I would have a simpler code base if Avivator were to be added to the viv library on npm. Actually, it does get packaged into the viv library locally if I run
|
@s-n-i Let's see what @manzt has to say about a layer. I'm not opposed since it seems like a common use-case, even outside of HCS. There are also loads of nice performance improvements, I imagine, to be made that everyone would benefit from. That being said, here is vizarr in a web app. This previous example is just one image but here are some HCS examples If What parts of |
Thank you for sharing the vizarr web app, I can see it potentially being suitable for our goals. We would just need to evaluate it in more detail. The motivation behind our approach is allowing the user to perform high-content screening by visualizing a grid of multiple datasets, which are not in the HCS format. This simplifies the data pipeline because data scientists would not need to convert existing datasets into HCS format. In Avivator I have changed Also, I am not 100% sure about this, but it looks like creating a custom layer would also require modifying the |
@s-n-i If you have altered those files, what would an Avivator component API look like should we release it? I guess one route I could see here that might make everyone happy:
The main thing I am worried about is how the controller would work - if all these images have different channels for example, you would need different controllers for each? How does this work? All that being said, I would feel comfortable with the above three changes. It will be a bit of work and we would want to get the API just right here, but this seems feasible. |
Here is how I have it currently implemented.
the loaders are set like this:
For the channels we have a few options:
|
Catching up on this thread. I think I would be supportive of iterating on a generalized gridlayer. We could use the vizarr implementation as a reference point as well as what you have been working on @s-n-i.
To clarify, vizarr is a general web-based image viewer for zarr-based images. It is intended to be used as a standalone web-app like Avivator (see embedded use in the OME Blog), and additionally has optional features for running within Jupyter Notebooks (and loading multiple image layers). Vizarr's key feature is support for OME-NGFF metadata. For example, rather than defining non-standard patterns for loading multiple images (i.e., comma separated URLs), plate layouts are expressed within the metadata. This allows Vizarr to be compatible with other NGFF-compatible viewers.
hmm, with the multi-tiff loader comma-separated lists of URLS already have "special" meaning in Avivator. Why not have a new route for Avivator (and actually make use of the BrowserRouter) (i.e., |
I looked up the length limits on URLs in different browsers: https://www.geeksforgeeks.org/maximum-length-of-a-url-in-different-browsers/ Looks like Microsoft Edge might not be able to fit URLs for hundreds of different datasets in the address bar. |
This is what I meant, not a(nother) file (format). As for the "hundreds of data sets" issue, I think we'll need to think about this a bit...one option if you all have the capacity would be a URL shortener. |
I also think I may have misunderstood - you are considering non-HCS datasets that you wish to compare that were acquired separately and have some value when looked at side-by-side? Or you have non-HCS format HCS-acquired datasets? |
At some point, pointing to many images URLs in the query parameters is just a poor choice. URL shortening means that the URLs are human readable, and there are likely better alternatives to expressing this information in a structured manner. Hundreds of URLs is unwieldy and the "comma separated list" is essentially a new format of its own. Also there is so much implicit information with a comma separated list of URLs. How many rows? how many columns? are the images all the same size? In this case some type of manifest JSON file is probably most appropriate which contains all this metadata as well as links to the individual images, but this is essentially OME-NGFF plate specification and I'd rather not create any sort of manifest that is Avivator-specific. Something like kerchunk could be used to create a "virtual" OME-NGFF plate from many TIFFs. Vizarr supports this kerchunk-reference based stores. Here is an example of reading and OME-TIFF as Zarr with a chunk reference: https://observablehq.com/@manzt/ome-tiff-as-filesystemreference |
Yes. I don't fully understand the distinction between datasets "acquired separately" and "HCS-acquired". |
More on this from a colleague:
|
So it sounds like @s-n-i you would be content with |
I will check with the team on whether to switch to For now, our |
6477c65
to
6c43fa4
Compare
Background
I am opening a draft PR to see if there is interest in having viv support loading multiple datasets for high content screening. This is accomplished by passing in an array of loaders and information on how to position the images next to each other into the PictureInPictureViewer. This change is backwards-compatible, so Avivator works as before. I marked the PR as draft because it is not yet ready to be merged, and I am looking for feedback. It would be great to have this functionality merged into viv, rather than maintaining a fork of viv.
Change List
Checklist