resomapper.core.utils
Functions
Allows selection of root directory showing a file explorer window. |
|
Allows selection of a file showing a file explorer window. |
|
Select from a checklist those modalities to be processed. |
|
|
|
|
Select values for different parameters in an emergent window. If a new value is |
|
Prompts the user with a question and expects a 'y' or 'n' answer. |
|
Prompt a question to the user, display options with meanings, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Module Contents
- resomapper.core.utils.select_directory()[source]
Allows selection of root directory showing a file explorer window.
- Returns:
full path to the selected directory.
- Return type:
Path
- resomapper.core.utils.select_file()[source]
Allows selection of a file showing a file explorer window.
- Returns:
full path to the selected file.
- Return type:
Path
- resomapper.core.utils.select_modalities_to_process()[source]
Select from a checklist those modalities to be processed.
- Returns:
list of str with the selected modalities.
- Return type:
list
- resomapper.core.utils.ask_user_parameters(parameter_dict)[source]
Select values for different parameters in an emergent window. If a new value is selected it has to be of the same class as the predetermined value.
- Parameters:
parameter_dict (dict) – Dictionary containing the name of the different parameters as keys, along with a list containing the predetermined value for each one and a brief description.
- Returns:
Dictionary containing the selected values for each parameter name.
- Return type:
dict
- resomapper.core.utils.ask_user(question)[source]
Prompts the user with a question and expects a ‘y’ or ‘n’ answer.
- Parameters:
question (str) – The question to be displayed to the user.
- Returns:
True if the user answers ‘y’, False if the user answers ‘n’.
- Return type:
bool
- resomapper.core.utils.ask_user_options(question, options)[source]
Prompt a question to the user, display options with meanings, and return the selected option.
- Parameters:
question (str) – The question to ask the user.
options (dict) – A dictionary containing the available options as keys and their meanings as values.
- Returns:
The selected option.
- Return type:
str