I am implementing the following pipeline:
- remote-dicom-server → 2) local-dicom-server (Orthanc) → 3) python processing → 4) local-dicom-server (same as on step 2) → remote-dicom-server (same as on step 1)
I learn how to do all the steps, but I want to reduce time consumption at step 4). Currently after processing the Series in python (step 3) I save it on disk and then use Orthanc API to send it to local-dicom-server.
Is there any way to avoid using storing result on disk and send it to local-dicom-server directly from Python?
I figured out it should be something like this
curl -X POST http://localhost:8042/instances --data-binary @CT.X.1.2.276.0.7230010.dcm
except instead of @CT.X.1.2.276.0.7230010.dcm I want to send pydicom.dataset.FileDataset object.
I tried to convert pydicom.dataset.FileDataset to bytes and use DoPost from RestToolbox.py (pass byte-sequence as data), but it does not work