Skip to content

Commit

Permalink
skip for exisiting image_id folders (#49)
Browse files Browse the repository at this point in the history
Co-authored-by: martvanrijthoven <[email protected]>
  • Loading branch information
martvanrijthoven and martvanrijthoven authored Apr 30, 2024
1 parent 8165f61 commit 0f4bf92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slidescore_api/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ def download_wsis(
# Download and save WSIs
for image in tqdm(images):
image_id = image["id"]

if (save_dir / image_id).exists():
logger.info("Skipping: image id folder already exists: %s", image_id)
continue
logger.info("Downloading image for id: %s", image_id)
filename = client.download_slide(study_id, image, save_dir=save_dir)
logger.info("Image with id %s has been saved to %s.", image_id, filename)
Expand Down

0 comments on commit 0f4bf92

Please sign in to comment.