Skip to main content

Hierarchy of Configuration Parameters

As explained before parameters can be provided in two different ways:

  1. The default configuration file _default.xml - located in /fsi/viewer/ - will always be evaluated first
  2. You can store image specific parameters in additional *.xml files in /fsi/viewer/config/
  3. You can override parameters from either configuration file by specifying them in the <fsi-viewer> tag

Parameters specified in multiple ways – for example in the default configuration and by custom configuration files– will be evaluated in the following way:

Parameters defined in configuration files override parameters defined in the default configuration file _default.xml. Parameters defined in the <fsi-viewer> tag override parameters defined in the custom configuration file. The list below shows the hierarchy resulting from the sequential evaluation of the different configuration methods:

Configuration Hierarchy

  1. Parameters set during runtime
  2. Parameters set via init() or via attribute in the HTML tag
  3. Configuration file (*.xml)
  4. Default configuration file (_default.xml)

Choosing the adequate Configuration Method

So far you learned that FSI Viewer can be configured by any combination of:

  • Parameters set during runtime
  • Parameters set via init() or via attribute in the HTML tag
  • Additional configuration files (*.xml)
  • The default configuration file (_default.xml)

These configuration options are not only alternate methods. Combining these methods offers the opportunity to provide configuration parameters as easily as possible and as dynamically as required. The following considerations might be helpful when deciding which method to choose for a certain parameter.

Concerning the configuration via configuration files or the default configuration file, in earlier versions it was possible to define global parameters via the <Options> node (e.g. skin). This is still possible, but if a parameter is defined in the custom viewer node (e.g. skin is set to white in the <Viewer> node), this parameter is superior to the one defined in the <Options> node.

Default Configuration

You can easily change global parameters that apply to all FSI Viewer instances by editing a single file. This is therefore the recommended configuration method for:

General configuration options like:

  • Skin
  • Language
  • MenuAlign, AnimationSpeed and alike

Configuration Files

Separate configuration files should be used for parameters specific to a group of images or a specific way to display images. You might for example want to set up individual configuration files for different types of FSI Viewer instances, like small_no_interface. xml, large_with_hotspots.xml as an example.

Usually you don‘t need to create a configuration file for individual images, as you can specify the image path or other unique parameters dynamically in the code.