Slicer windows in a custom web application

Hi all, I have a somewhat abstract question regarding integrating slicer windows in a custom web application window. Generally I suppose it should work something like this teamplay+Slicer 2017 02 10 - YouTube meaning that the Slicer instance would be running in a docker instance (deployed in bundle with other docker containers) which would be able to receive requests and open a selected study in a slicer window on command. However, optimally I would be looking for a way to do an even deeper integration, which would allow to display a custom slicer window as an iframe or similar in an interactive custom html page.
Optimally it should look like something like SlicerJupyter UI, only integrated in a custom UI and without the code.
Screenshot from 2022-08-10 11-29-02
Is there a way to do this with Slicer, if so what could be the best way to do it (using SlicerDocker/JupyterSlicer/SlicerWeb?).

I am not sure if there are existing examples of a similar type of integration. Thanks to anyone in advance :).

It sounds like you have a use case that would be a good fit for the WebServer module now in Slicer 5.0.3 (the module used to be in the SlicerWeb extension prototype). The WebServer exposes a rest api that can be used to control Slicer and get rendered images.

This looks very promising, thank you! Is it possible to set it up to support multiple concurrent users?
Will investigate and try it out.

Yes, if the concurrent users need to access the same data and other state they can access the same Slicer instance. If they need a private session then the server can be run from different instances of Slicer using distinct ports (e.g. in different docker containers or just running in different processes). Let us know how it goes!

Understood, thank you.
I am stuggling a bit to find these endpoints described in the Remote Rendering:
“There are several endpoints to get png images from slice views and 3D views. These endpoints allow control of slice offset or 3D camera view (see method doc strings in the source code for options since there is currently no auto-generated api documentation)”
Also, are these enpoints designed to return static png images, or is there a posibility to return a dynamic endpoint, which return a red slice window for example, with the scolling controls, similarly like a JupyterSlicer function?

from ipywidgets import interact
def update(position=50):
    return slicernb.ViewSliceDisplay('Red', positionPercent=position)

The assumption is that the client (javascript) would implement all the control like sliders to touch interactions and just use the WebServer api to set rendering parameters and retrieve rendered data. So you would build the scrollTo parameter value based on the state of the slider and get back the png of the current slice.