Dataset¶
Class to represent a dataset as a whole or for each study
-
class
munge.Dataset.
Dataset
(config_file='config.json')¶ Bases:
object
Dataset class can be instantiated with the following args
- parameters, types, return and return types:
Parameters: config_file (string) – full path of the application config file -
asarray
()¶ Returns the array representation of all the data points in this dataset
Returns: array of data and labels of this dataset
-
get_all
()¶ Maps the images with the contours and returns a generator with data points
Returns: generator of instances of DataElement
having the corresponding image and contour
-
get_by_study
(patient_id)¶ Maps the images with contours and returns a generator with data points, for the given study
Parameters: patient_id – unique ID of the study Returns: generator of instances of DataElement
having the corresponding image and contour, for the given study
-
plot_verification_for_study
(patiend_id, filename=None, rows=5, columns=5)¶ Plots a series of images with the corresponding contour patches for the given study
Parameters: - patient_id – unique ID of the study
- filename – filename to save the plot in
- rows – number of rows in the plot
- columns – number of columns in the plot
-
to_dict
(patient_id=None)¶ Returns the Dict representation of the dataset
Returns: Dict having id, dcm_path and contour_path attributes of the data points in this dataset