Working with zip-files with dicom-files inside

Hi, folks.

I am working on python-based plugin for Orthanc-server. The task is to use a cloud service instead of local filesystem as dicom-files storage.

Currently the cloud storage stores studies as zip-files, one patient => zip-file-with-many-dicom-files.

What is the best way to approach this task assuming that Orthanc server expects dicom-files as data source, not the zip-archives.

Any suggestions are welcome.

Thank you, folks.

Hi @rafo,

Run away :wink:

In the current implementation, the storage plugins only gets a uuid and a binary buffer to store → no information about the patient. You would need to parse the buffer to extract the patient info.

Then, you’ll need to remember this mapping (e.g, where this uuid has been stored) → you’ll need an external DB for that.

These 2 first problems can be solved once we release a new SDK that is currently under development but has been delayed + we need to make it available in python.

Then, come the real problems:

  • each time you’ll receive a new file, you’ll have to load the existing zip, append the new file, zip it again and save the whole zip again → terribly inefficient.
  • each time Orthanc will try to read a file, you’ll have to load the full zip, unzip it, get the file → terribly inefficient as well.
  • of course, you can improve that with caching but I’m pretty sure you’ll never reach decent performances.

To summarize: pain and tears - run away :wink:

Alain.

1 Like

Thank you :slight_smile: