Configurations

mermaid makes use of various configurations to parametrize the registration algorithms and how computations are performed (e.g., CPU or GPU).

Config parser

mermaid.config_parser.get_default_compute_settings_filenames()[source]

Returns the filename string where the compute settings will be read from.

Returns:filename string
mermaid.config_parser.get_default_baseconf_settings_filenames()[source]

Returns the filename string where the basic configuration will be read from.

Returns:filename string
mermaid.config_parser.get_default_democonf_settings_filenames()[source]

Returns the filename string where the configuration for demo datasets will be read from.

Returns:filename string
mermaid.config_parser.get_default_algconf_settings_filenames()[source]

Returns the filename string where the configuration for the registration algorithm will be read from.

Returns:filename string
mermaid.config_parser.get_default_respro_settings_filenames()[source]
mermaid.config_parser.CUDA_ON = True

If set to True CUDA will be used, otherwise it will not be used

mermaid.config_parser.USE_FLOAT16 = False

If set to True 16 bit computations will be used – not recommended and not actively supported

mermaid.config_parser.nr_of_threads = 16

Specifies the number of threads

mermaid.config_parser.MATPLOTLIB_AGG = False

If set to True matplotlib’s AGG graphics renderer will be used; this should be set to True if run on a server and to False if visualization are desired as part of an interactive compute session

mermaid.config_parser.get_baseconf_settings(baseconf_settings_filename=None)[source]

Returns the basic configuration settings as a parameter structure.

Parameters:baseconf_settings_filename – loads the settings from the specified filename, otherwise from the default filename or in the absence of such a file creates default settings from scratch.
Returns:parameter structure
mermaid.config_parser.get_democonf_settings(democonf_settings_filename=None)[source]

Returns the configuration settings for the demo data as a parameter structure.

Parameters:democonf_settings_filename – loads the settings from the specified filename, otherwise from the default filename or in the absence of such a file creates default settings from scratch.
Returns:parameter structure
mermaid.config_parser.get_algconf_settings(algconf_settings_filename=None)[source]

Returns the registration algorithm configuration settings as a parameter structure.

Parameters:algconf_settings_filename – loads the settings from the specified filename, otherwise from the default filename or in the absence of such a file creates default settings from scratch.
Returns:parameter structure
mermaid.config_parser.get_respro_settings(respro_settings_filename=None)[source]

Parameter module

Inheritance diagram of mermaid.module_parameters

This package implements a simple way of dealing with parameters, ofproviding default parameters and comments, and to keep track of used parameters for registration runs. See the corresponding note for a brief description on how to use it.

class mermaid.module_parameters.ParameterDict(initDict=None, printSettings=True)[source]
isempty()[source]
load_JSON(fileName)[source]

Loads a JSON configuration file

Parameters:fileName – filename of the configuration to be loaded
write_JSON_and_JSON_comments(fileNames)[source]

Writes the JSON configuration to a file

Parameters:fileNames – filename tuple; first entry is filename for configuration, second for comments
write_JSON(fileName, save_int=True)[source]

Writes the JSON configuration to a file

Parameters:fileName – filename to write the configuration to
write_JSON_comments(fileNameComments)[source]

Writes the JSON commments file. This file will not contain any actual values, but instead descriptions of the settings (if they have been provided). The goal is to provide self-documenting configuration files.

Parameters:fileNameComments – filename to write the commented JSON configuration to
print_settings_on()[source]

Enable screen output as configurations are read and set.

print_settings_off()[source]

Disable screen output as configurations are read and set.

get_print_settings()[source]

Current print settings :return: Returns if screen printing is on (True) or off (False)

set_print_settings(val)[source]

Sets Current print settings :param val: value to set the print settings to, needs to be boolean :return: n/a

has_key(key_list)[source]
mermaid.module_parameters.test_parameter_dict()[source]

Convenience testing script (to be converted to an actual test)