Clone wiki

WADQC / Module Configs

Module Configs

The ModuleConfigs or "configs" are json files with instructions for the accompanying Analysis Module. They contain a dictionary "actions" indicating which tests included in the Analysis Module to perform on the incoming data files. For each action, a dictionary "params" of run time parameters is defined, which can be adjusted if the analysis fails. To make the results of the analysis reproducible, each Results stored in the WAD-QC database keeps a reference to the actual config used during analysis.

Format

The config must be a valid json file, containing the value "cfgformat" and the dictionaries "actions" and "comments" and "info".

{
    "cfgformat": "20180910", 
    "actions": {
    }, 
    "info": {
    },
    "comments": {
    }
}

cfgformat

The value cfgformat is introduced in WAD-QC 0.7.9, and indicates the format of the template used in the config file.

actions

The actions block has the following structure:

"actions": {
   "action1": {
      "filters": {},
      "params": {
         "param1.1": "value1",
         "param2.1": "value2"
      }
    }, 
   "action2": {
      "filters": {},
      "params": {
         "param2.1": "value1",
         "param2.2": "value2"
      }
   }
} 

Because the actions block is a dictionary, the names of the actions must be unique.

The fields "params" and "filters" are required.

Note that here each parameter is defined as a simple key-value pair, but (nested) dictionaries or lists are als allowed. It depends on the Analysis Module, what format is expected.

info

The info block has exactly the same structure as the actions block (but without the filters). Instead of values for the parameters, it now contains a hint to describe what kind of value is needed for this parameter.

"info": {
   "action1": {
      "params": {
         "param1.1": "this must be a float value",
         "param2.1": "negative values are not allowed"
      }
    }, 
   "action2": {
      "params": {
         "param2.1": "use semi-colons to specify all coordinates in mm",
         "param2.2": "optional"
      }
   }
} 

comments

The comments block is reserved for information about the config. It has the following structure:

"comments": {
   "author": "A Schilham",
   "description": "Uniformity Test without phantom on a Siemens SOMATOM Force",
   "version": "20180821",
   "usage": [
    "action1 calculates the uniformity pixelwise",
    "action2 calculates the uniformity slicewise"
   ]
}

The fields "author" and "version" are required elements of the comments block. Note that in the params field, the same parameter names are used as were given in the actions block.

Lifecycle of a Module Config

There are several ways of adding Module Configs to a WAD-QC system:

  • By installing factory modules or, importing user modules a set of accompanying configs is installed as well (see Analysis Modules)
  • By restoring Selectors, the accompanying configs are installed as well (see Selectors)
  • New user configs can be uploaded manually
  • Existing configs can be duplicated
  • Configs coupled to a Selector can be modified. In that case the previous config is kept in the database, but also a new config is generated.

Adding a Config

Normally the configs provided with the factory modules should be sufficient to set up a functioning WAD-QC system. If this is not the case, new Module Configs can be uploaded manually.

Select "module configs" in the Advanced section of the WAD-Admin home page to open the Configs overview page. This will give you a table with all installed Module Configs. To upload a new config, press the "New" button.

New Config Page

Pick a good name and set a description, choose the Analysis Module to which this config should be linked, set the expected type of data for processing, and upload the config and if you have one, upload the meta file as well.

Alternatively, you could use the "copy" button on Configs overview page to clone a previously installed config, and then use the "configure" button for the new config to adjust the details and upload a new config.

Edit an installed config

If a config is coupled to a Selector, the config can be edited in the Configs can be edited in the Modify Selector page (see Selectors). It can also be directly edited in the Configs overview page, by clicking on the name of the config.

Note that if a config that is coupled to a Selector (or Process or Result) is edited, then after editing a new config is stored while keeping the old one as well. The selector will point to the new config, while Processes and Results will still point to the old config.

Similarly, editing a factory config will result in a new user config.

Delete an installed config

The "delete" button next to a config in the table in he Configs overview page can be used to delete an installed config. If the config is coupled to a Selector, you cannot delete it, because that would set of a cascade deleting also the Selector and all its Results. If a config is coupled to Results or Processes, deleting the config also deletes all these coupled Processes and Results.

Updated