IOparser Package
config_WORC Module
config_io_PyRadiomics Module
config_io_classifier Module
config_io_combat Module
config_preprocessing Module
config_segmentix Module
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.
- WORC.IOparser.file_io.windows_file_parser(foldername, searchstrings, searchfilename, outputtype='features')[source]
Check which files should be passed to a function.
Can be applied to circumvent the Windows command line limit to “manually” search for files which should be fe to a function, instead of WORC passing these directly into the function.
- Parameters
- foldername: string, mandatory
Folder in which to search
- searchstrings: list of strings, mandatory
String(s) used to search for files in the foldername
- searchfilename: string, mandatory
Name of files which should be looked for in the found subfolders.
- outputtype: string, optional
Type of filenames that are output. Default: “features”
- Output
output: list