Skip to content

Script to upload directories of DICOM files to MinIO

Notifications You must be signed in to change notification settings

SMI/dicom-to-minio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DICOM to MinIO

Script to upload directories of DICOM files to MinIO.

Requires:

  • Python
  • MinIO mc client
  • gzip

Features:

  • Compresses each directory on upload. Compression level is configurable (default gzip -9)
  • Adds useful object metadata:
    {
      "X-Amz-Meta-Content-Md5": "8b0dcc24439db3359bdd926f025aa635",
      "X-Amz-Meta-Modalities": "CT,SR",
      "X-Amz-Meta-Total-Count": "4"
    }
  • Verify checksum of existing objects, and --overwrite if specified

Directory format must be <prefix>/<YYYY>/<MM>/<DD>/<AccessionNumber>/, e.g., /PACS/2017/05/28/ABCD.

This can be used in a parallel loop like so:

$ find ~/tmp/PACS -mindepth 4 -maxdepth 4 -type d -print0 |
    xargs -P4 -0 -i bash -c './dicom-to-minio.py myminio/test-1/pacs ~/tmp/PACS ${1#/home/rkm/tmp/PACS/}' - "{}"

About

Script to upload directories of DICOM files to MinIO

Resources

Stars

Watchers

Forks

Languages