FlexPreprocessInitializer package

Submodules

FlexPreprocessInitializer.InitializeFlexPreprocessor module

This module is responsible for determining the selection and order for preprocessing the image.

class FlexPreprocessInitializer.InitializeFlexPreprocessor.InitializeFlexPreprocessor

Bases: object

This class allows the user to select preprocessors to be used.

The user can determine the selection, as well as the order in which preprocessors are used. The user input is checked against possible conditions for validity.

static create_preprocessor_sequence(pp_dict, default_pp)

Determines the preprocessor selection and sequence based on user input.

Outputs warnings via print statements if the user input is invalid.

Todo

  • re.match(“^[1-9, ]*$”, pp_sequence) is line 48 allows all number above 1!
Parameters:
  • pp_dict – Dictionary containing the available preprocessors and their corresponding keys.
  • default_pp – A list containing the default selection and order of preprocessors.
Returns:

List of selected preprocessors in the requested order.

static print_instructions()

Prints the instructions for the user.

init_preprocessor_sequence()

Initializes the class and list/dictionary variables which store the default preprocessors.

Returns:The list of selected preprocessors, in the order they are chosen.

Module contents