cciausu97 commited on
Commit
82b653b
·
verified ·
1 Parent(s): c36d719

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -72,14 +72,14 @@ serieUIDs_list = ["1.3.6.1.4.1.14519.5.2.1.8421.4008.125612661111422710051062993
72
 
73
  #download series and convert to .nii.gz
74
  samples_root_dir = "model/asset/idc_samples"
75
- if not os.path.exists(samples_root_dir) : os.mkdir(samples_root_dir)
 
76
  for idx, serieUID_ddl in enumerate(serieUIDs_list):
77
  sample_dcm_dir = os.path.join(samples_root_dir, f"ddl_series{idx}_dcm")
78
  sample_nii_dir = os.path.join(samples_root_dir, f"ddl_series{idx}_nii")
79
  for dir in [sample_dcm_dir, sample_nii_dir]:
80
- if os.path.exists(dir):
81
- shutil.rmtree(dir)
82
- os.makedirs(dir)
83
  client.download_from_selection(seriesInstanceUID=\
84
  serieUID_ddl, \
85
  downloadDir=sample_dcm_dir)
 
72
 
73
  #download series and convert to .nii.gz
74
  samples_root_dir = "model/asset/idc_samples"
75
+ if os.path.exists(samples_root_dir): shutil.rmtree(samples_root_dir)
76
+ os.mkdir(samples_root_dir)
77
  for idx, serieUID_ddl in enumerate(serieUIDs_list):
78
  sample_dcm_dir = os.path.join(samples_root_dir, f"ddl_series{idx}_dcm")
79
  sample_nii_dir = os.path.join(samples_root_dir, f"ddl_series{idx}_nii")
80
  for dir in [sample_dcm_dir, sample_nii_dir]:
81
+ if os.path.exists(dir): shutil.rmtree(dir)
82
+ os.mkdir(dir)
 
83
  client.download_from_selection(seriesInstanceUID=\
84
  serieUID_ddl, \
85
  downloadDir=sample_dcm_dir)