processing Package¶
ExtractNLargestBlobsn Module¶
-
WORC.processing.ExtractNLargestBlobsn.ExtractNLargestBlobsn(binaryImage, numberToExtract=1)[source]¶ Extract N largest blobs from binary image.
- Arguments:
binaryImage: boolean numpy array one or several contours. numberToExtract: number of blobs to extract (integer).
- Returns:
- binaryImage: boolean numpy are containing only the N
extracted blobs.
RTStructReader Module¶
classes Module¶
-
class
WORC.processing.classes.switch(value)[source]¶ Bases:
objectObject to mimic the MATLAB switch - case statement.
-
__dict__= mappingproxy({'__module__': 'WORC.processing.classes', '__doc__': ' Object to mimic the MATLAB switch - case statement.', '__init__': <function switch.__init__>, '__iter__': <function switch.__iter__>, 'match': <function switch.match>, '__dict__': <attribute '__dict__' of 'switch' objects>, '__weakref__': <attribute '__weakref__' of 'switch' objects>})¶
-
__module__= 'WORC.processing.classes'¶
-
__weakref__¶ list of weak references to the object (if defined)
-
label_processing Module¶
-
WORC.processing.label_processing.findlabeldata(patientinfo, label_type, filenames, image_features_temp=None)[source]¶ Load the label data and match to the unage features.
- Args:
patientinfo (string): file with patient label data label_type (string): name of the label read out from patientinfo filenames (list): names of the patient feature files, used for matching image_features (np.array or list): array of the features
- Returns:
label_data (dict): contains patient ids, their labels and the label name
-
WORC.processing.label_processing.load_config_XNAT(config_file_path)[source]¶ Configparser for retreiving patient data from XNAT.
-
WORC.processing.label_processing.load_label_XNAT(label_info)[source]¶ Load the patient IDs and label data from XNAT, Only works if you have a file /resources/GENETICS/files/genetics.json for each patient containing a single dictionary of all labels.
- Args:
url (string): XNAT URL project: XNAT project ID
- Returns:
label_names (numpy array): Names of the different labels patient_ID (numpy array): IDs of patients for which label data is
loaded
- label_status (numpy array): The status of the different labels
for each patient
-
WORC.processing.label_processing.load_label_csv(input_file)[source]¶ Load the patient IDs and label data from the label file
- Args:
input_file (string): Path of the label file
- Returns:
label_names (numpy array): Names of the different labels patient_ID (numpy array): IDs of patients for which label data is
loaded
- label_status (numpy array): The status of the different labels
for each patient
-
WORC.processing.label_processing.load_label_txt(input_file)[source]¶ Load the patient IDs and label data from the label file
- Args:
input_file (string): Path of the label file
- Returns:
label_names (numpy array): Names of the different labels patient_ID (numpy array): IDs of patients for which label data is
loaded
- label_status (numpy array): The status of the different labels
for each patient
-
WORC.processing.label_processing.load_labels(label_file, label_type)[source]¶ Loads the label data from a label file
- Args:
label_file (string): The path to the label file label_type (list): List of the names of the labels to load
- Returns:
- dict: A dict containing ‘patient_IDs’, ‘label’ and
‘label_type’