Skip to content

Instantly share code, notes, and snippets.

View sscotti's full-sized avatar
💭
Working from home or mobile

Stephen D. Scotti sscotti

💭
Working from home or mobile
View GitHub Profile
@jphdotam
jphdotam / migrate_orthanc.py
Last active April 22, 2024 06:48
Migrate one Orthanc server to another using multiple threads
# this is inspired by the official ImportDicomFiles.py - however, this is MUCH faster because
# it uses multiple workers to dramatically reduce IO bottlenecks
# it doesn't re-instantiate the Http() and headers for every file, rather every folder
# it does assume the input folders are structured in the orthanc format, e.g. /00/00/0000a8768bd86...
# and expects PATH_TO_SYNC to be something like:
## "/path/to/orthanc/root/*" for all root folders
## "/path/to/orthanc/root/1*" for all folders beginning with 1
## "/path/to/orthanc/root/23" for root folder 23 only