123456789101112131415161718192021222324 |
- def generate_numpy_ds(dataset_type):
- """
- This function generates the directory structure for the final numpy
- arrays for the training and test sets.
-
- Director structure for processed data:
- ProstateX/generated/train/numpy
- ProstateX/generated/test/numpy
- """
- if dataset_type == str(1):
- new_path = Path('E:/Memoire/ProstateX/generated/train/numpy/')
- new_path.mkdir(parents = True, exist_ok = True)
- new_path.joinpath('t2').mkdir(parents = True, exist_ok = True)
- new_path.joinpath('bval').mkdir(parents = True, exist_ok = True)
- new_path.joinpath('adc').mkdir(parents = True, exist_ok = True)
- new_path.joinpath('ktrans').mkdir(parents = True, exist_ok = True)
- else:
- new_path = Path('E:/Memoire/ProstateX/generated/test/numpy/')
- new_path.mkdir(parents = True, exist_ok = True)
- new_path.joinpath('t2').mkdir(parents = True, exist_ok = True)
- new_path.joinpath('bval').mkdir(parents = True, exist_ok = True)
- new_path.joinpath('adc').mkdir(parents = True, exist_ok = True)
- new_path.joinpath('ktrans').mkdir(parents = True, exist_ok = True)
-
|