RationAI / xopat

Histopatholical visualization toolkit based on OpenSeaDragon.
MIT License
17 stars 4 forks source link

Loading Z-Stacked NDPI Files #54

Open hbilal-md opened 2 weeks ago

hbilal-md commented 2 weeks ago

Hi Aiosa, i saw a post on image.sc from years ago where someone was talking about needing a NDPI viewer based on openseadragon. Then the follow up comment talks about creating xopat.

Wanted to check in with you to see if this new viewer works with ndpi files directly? Does it support z-stacked NDPI files?

Aiosa commented 1 week ago

Hi, the viewer itself does not concern itself with support for any file formats at all. This is dependent on the server that talks to the viewer. The viewer tries to make it possible to integrate with various services (image and other data) such that it is useable for most use-cases.

So if you have a NDPI-capable image server, and the server either uses a standard high-resolution imaging protocol (DZI, IIIF...) or you implement a new protocol connection, then yes. This server should be able to deal with NDPI. This module implements the logics to connecting to this server.

If you need help with spinning up these services, please let me know.

Regarding the Z-Stack, it is not officially supported on the slide-like behaviour level, but you can still open them. Thanks to its visualization capabilities, the viewer supports timeSeries visuzliation style that takes any child style and groups them with a slider, e.g. using the series with identity will allow you ranging through the Z stack. The issue there is that you are rendering the WSI as a data layer (could be problematic with annotations that measure wrt. base image layer), and you have to provide the data beforehand explicitly, e.g. somehow providing the z-stack in the data session parameter as if each z-stack was an unique file.

To add direct z-stack support for a slide should be rather trivial too, depending on the server and protocol used. Since the recomended viewer supports z-stacks (at least theoretically, never tried myself), all you need to add is a plugin that attaches a slider for the user and sets a target z-stack to read for the linked module. The module would need a small modification too, it would need to add a z query argument to the url, that is a small change I can add.