rs2mask¶
Dataset¶
-
class
segmentation_rt.rs2mask.rs2mask.Dataset(path, export_path, structures, force=True)¶ Bases:
objectFrom dicom to dataset class. Convert CT and RTSTRUCT into nii, readable by deep learning frameworks.
All subfolders representing subject must contain the CT and the RS associated.
- Example:
>>> from segmentation_rt.rs2mask import Dataset >>> structures = ['Heart', 'Breast L', 'Breast R'] >>> dataset = Dataset('data/dicom_dataset', 'data/nii_dataset', structures) >>> dataset.make()
- Parameters
path (string) – Root directory.
export_path (string) – Export path.
structures (list[string]) – List of desired structure(s).
force (bool) – Force export even if one structure is missing.
-
find_structures(index)¶ List missing and not missing structures in a RTSTRUCT.
- Parameters
index (int) – index of the patient.
- Returns
List missing and not missing structures.
- Return type
(list[str],list[str])
-
get_rs()¶ List RTSTRUCT for each patient.
- Return type
list[str]
-
make()¶ Create structures and convert the CT in nii format for each subject.