3D Slicer Web Server

## Data Management

- ### Load sample data

  Load MRHead sample data set

  slicer/sampledata?name=MRHead

- ### Download volume

  Download a dataset in nrrd format.

  slicer/volume

## Viewers

- ### Main Window

  Set displayed GUI elements and and viewers layout in the application main window.

  slicer/gui?contents=viewers&viewersLayout=FourUp
  slicer/gui?contents=full&viewersLayout=OneUp3D
  slicer/gui?contents=full&viewersLayout=FourUp

- ### Screenshot

  Displays screenshot of the application main main window.

  slicer/screenshot

- ### Slice Views

  Displays the current contents of a Slicer slice view window.

  slicer/slice
  slicer/slice?orientation=sagittal
  slicer/slice?orientation=axial&scrollTo=.3
  slicer/slice?orientation=axial&scrollTo=.6

- ### 3D Views

  Displays the current contents of a 3D view window.

  slicer/threeD
  slicer/threeD?lookFromAxis=left
  slicer/threeD?lookFromAxis=anterior
  slicer/threeD?lookFromAxis=inferior

## DICOMweb

If "DICOMweb API" option is enabled in the Web Server module then the content of the Slicer DICOM database is exposed via DICOMweb protocol.

- ### Remote DICOM database browser

  Allow remote browsing and viewing of images stored in the Slicer DICOM database using OHIF.

  ### DICOM database browser

- ### Studies

  Get list of all studies.

  dicom/studies

- ### Series

  Get series for a selected study. Replace "1.2.840..." with the actual Study Instance UID. This can be obtained from the study list response: it is stored under the "0020000D" key.

  dicom/studies/1.2.840.113619.2.379.176156465722799.2705.1648495543276.8/series

## Performance Tests

- ### Time Image

  Displays an image dynamically generated by the SlicerWeb server as a rendering of the current system time down to 100ths of a second. A new image is generate each time the page is refreshed.

  slicer/timeimage
  slicer/timeimage?color=ff0

- ### Time Cube

  Uses the Time Image url as the source for a texture map on a WebGL cube (only works on browsers where WebGL is supported). A random color is passed from the client to the server each frame and is used to render the border. This test is useful to see the response rate for round-trip accesses of the server.

  ServerTests/timecube.html

## Rendering Tests

- ### WebGL Slicer ThreeD View Cube

  Spinning cube with dynamic texture of rendered scene fetched from slicer

- ### ThreeJS example

  Example of using Slicer data with Three JS.

  This example uses the /slicer/threeDGraphics endpoint to get a glTF representation of the threeD view. If you have a segmentations or models in Slicer it will load your current threeD view, otherwise it will download a scene with sample models.

  The data is loaded in threejs demo scene letting you play with a glowing neon light like rendering of your scene. This experiment shows an option for highlighting selected objects in a complex 3D scene. Random models will be highlighted and you can toggle them by clicking. The neon light effect is one of a wide array of different rendering options available in threejs.

  The javascript source code for this demo shows how to access the threeDGraphics endpoint and how to populate the mrml scene using the exec endpoint to send python code from javascript.

  Depending on scene complexity this may take a few moments to load.

- ### modelviewer example

  Example of using Slicer data with Google's modelviewer web component for web and XR.

  This example uses the /slicer/threeDGraphics endpoint to get a glTF representation of the threeD view. If you have a segmentations or models in Slicer it will load your current threeD view, otherwise it will download a scene with sample models.

  The data is loaded in modelviewer demo scene.

  The javascript source code for this demo shows how to access the threeDGraphics endpoint and how to populate the mrml scene using the exec endpoint to send python code from javascript.

  Depending on scene complexity this may take a few moments to load.

- ### VolView examples

  Load a volume in Slicer to see it in VolView.

  Be sure the slicer api and cors are enabled.

  volview from kitware can load data from slicer directly using a url parameter.

  https://volview.netlify.app/?names=%5bmrhead.nrrd%5d&urls=%5bhttp://localhost:2016/slicer/volume%5d

- ### WebXR controller

  Requires https and a compatible device. Setting up https currently requires editing the source code of this module to specify certificate and key files. Compatible devices include Android phones from about 2022 or later.

  See this page from Project Week 40 for more background.

  Uses WebXR to interact with Slicer scene.

  WebXR-controller (requires WebXR browser and https cert enabled)