Skip to content

Commit

Permalink
Fix num_files when merging
Browse files Browse the repository at this point in the history
  • Loading branch information
phcerdan committed Dec 26, 2023
1 parent 5d1b4c2 commit 0ed4dab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mdai_utils/download_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ def get_dicom_names_ordered_and_metadata(dicom_dir):
series_uids = io.GetSeriesUIDs()
error_msg += f"\nFound more than one series with more than 20 files each {num_files}. Reading the series without date distinction, merging into one series."
selected_index = 0
num_files = [io.GetFileNames(s) for s in series_uids]
files = io.GetFileNames(series_uids[0])
num_files = [len(files)]
sops_per_series = [Path(f).stem for f in files]

error_msg += (
f"\nSelected series {selected_index} with {num_files[selected_index]} files"
Expand Down

0 comments on commit 0ed4dab

Please sign in to comment.