Skip to content

Viewer Configurations

xOpat has three configuration levels:

  1. static configuration: available to the system manager, configures the viewer as shown in the previous chapter. Up-to-date configuration can be generated using grunt env, but it has to be modified (notably the default server to use).
  2. dynamic configuration: configuration given to the viewer at startup, decides the viewer session - the data you can view, the dynamic plugin configurations
  3. cached configuration: anything that is being cached when using the viewer

Higher level overrides values in the lower level. Unsafe values are typically configurable only with static configuration, the dynamic configuration usually setups the actual workplace for a given user.

Dynamic configuration & Opening the Viewer

We've seen http://localhost:9000/?slides=*SLIDE_ID* way of opening the viewer. In fact, this only creates default dynamic configuration for the viewer. If you want to have more control, you can provide such configuration:

Example of the configuration:

{    
    "params": {
        "theme": "dark"
    }, 
    "data": ["slide_1", "slide_2"],
    "background": [
        {
            "dataReference": 0,
            "lossless": false,
        }
    ],
    "visualizations": [
        {
            "name": "A visualization setup 1",
            "lossless": true,
            "shaders": {
                "shader_id_1": { 
                    "name": "My visualization layer",
                    "type": "heatmap", 
                    "fixed": false,
                    "visible": 1, 
                    "dataReferences": [1],
                    "params": {}
                }
            }      
        }
    ],
    "plugins": {} 
}
Typically, you can delete unused keys. They are shown here just for the sake of completeness.