niftynet.utilities.user_parameters_helper module

str2boolean(string_input)[source]

convert user input config string to boolean :param string_input: any string in TRUE_VALUE or FALSE_VALUE :return: True or False

int_array(string_input)[source]
float_array(string_input)[source]
str_array(string_input)[source]
make_input_tuple(input_str, element_type=(<type 'basestring'>, ))[source]
standardise_section_name(configparser, old_name)[source]

rename configparser section This helper is useful when user specifies complex section names

standardise_string(input_string)[source]

to make the user’s input consistent replace any characters not in set [0-9a-zA-Z] with underscore _

Parameters:input_string – to be standardised
Returns:capitalised string
has_section_in_config(config, required_custom_section)[source]
add_input_name_args(parser, supported_input)[source]
spatialnumarray(string_input)[source]

This function parses a 3-element tuple from a string input