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.
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
Parameter module¶

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]¶ -
-
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
-
get_print_settings
()[source]¶ Current print settings :return: Returns if screen printing is on (True) or off (False)
-