IOparser Package

config_WORC Module

WORC.IOparser.config_WORC.load_config(config_file_path)[source]

Parse a WORC configuration file.

Arguments:

config_file_path: path to the configuration file to be parsed.

Returns:

settings_dict: dictionary containing all parsed settings.

config_io_PyRadiomics Module

WORC.IOparser.config_io_PyRadiomics.load_config(config_file_path)[source]

config_io_classifier Module

WORC.IOparser.config_io_classifier.load_config(config_file_path)[source]

Load the config ini, parse settings to WORC.

Args:

config_file_path (String): path of the .ini config file

Returns:

settings_dict (dict): dict with the loaded settings

config_io_combat Module

WORC.IOparser.config_io_combat.load_config(config_file_path)[source]

Load the config ini, parse settings to WORC

Args:

config_file_path (String): path of the .ini config file

Returns:

settings_dict (dict): dict with the loaded settings

config_preprocessing Module

WORC.IOparser.config_preprocessing.load_config(config_file_path)[source]

Parse a WORC configuration file.

Arguments:

config_file_path: path to the configuration file to be parsed.

Returns:

settings_dict: dictionary containing all parsed settings.

config_segmentix Module

WORC.IOparser.config_segmentix.load_config(config_file_path)[source]

Parse a segmentix configuration file.

Arguments:

config_file_path: path to the configuration file to be parsed.

Returns:

settings_dict: dictionary containing all parsed settings.

file_io Module

WORC.IOparser.file_io.convert_config_pyradiomics(config)[source]

Convert WORC to PyRadiomics config.

Convert fields from WORC confiparser object to a PyRadiomics compatible dictionary.

WORC.IOparser.file_io.load_data(featurefiles, patientinfo=None, label_names=None, modnames=[], combine_features=False, combine_method='mean')[source]

Read feature files and stack the features per patient in an array.

Additionally, if a patient label file is supplied, the features from a patient will be matched to the labels.

Parameters

featurefiles: list, mandatory

List containing all paths to the .hdf5 feature files to be loaded. The argument should contain a list per modelity, e.g. [[features_mod1_patient1, features_mod1_patient2, …],

[features_mod2_patient1, features_mod2_patient2, …]].

patientinfo: string, optional

Path referring to the .txt file to be used to read patient labels from. See the Github Wiki for the format.

label_names: list, optional

List containing all the labels that should be extracted from the patientinfo file.

combine_features: boolean, default False

Determines whether to combine the features from all samples of the same patient or not.

combine_methods: string, mean or max

If features per patient should be combined, determine how.

WORC.IOparser.file_io.load_features(feat, patientinfo, label_type, combine_features=False, combine_method='mean')[source]

Read feature files and stack the features per patient in an array.

Additionally, if a patient label file is supplied, the features from a patient will be matched to the labels.

Parameters

featurefiles: list, mandatory

List containing all paths to the .hdf5 feature files to be loaded. The argument should contain a list per modelity, e.g. [[features_mod1_patient1, features_mod1_patient2, …],

[features_mod2_patient1, features_mod2_patient2, …]].

patientinfo: string, optional

Path referring to the .txt file to be used to read patient labels from. See the Github Wiki for the format.

label_names: list, optional

List containing all the labels that should be extracted from the patientinfo file.

combine_features: boolean, default False

Determines whether to combine the features from all samples of the same patient or not.

combine_methods: string, mean or max

If features per patient should be combined, determine how.