visiannot.configuration.update

Summary

Module defining functions for updating configuration dictionary before launching GUI

Functions

visiannot.configuration.update.update_data_and_annotations_directory(…)

Opens a dialog window for selecting a directory containing data to display in ViSiAnnoT, loads a configuration file and updates configuration dictionary with the selected directory

API

Functions

visiannot.configuration.update.update_data_and_annotations_directory(config_path)[source]

Opens a dialog window for selecting a directory containing data to display in ViSiAnnoT, loads a configuration file and updates configuration dictionary with the selected directory

Parameters

config_path (str) – path to configuration file to load

The configuration file may contain the key data_dir_base in the section General. Thus, the dialog window opens at the location specified by this key.

Once the data directory is selected, the following field are updated in the configuration dictionary:

  • First field of the Video and Signal sub-configurations (data directory)

  • Key annot_dir in section General (annotation directory).

The annotation directory is updated as follows: annotBase/recName/patID, where annotBase is the initial value of the annotation directory in the configuration file, recName is the basename of the selected data directory and patID = recName.split('_')[0].