I have an Orthanc setup having MySQL DB as its backend and orthanc is registered with the PACS. I have a requirement to download the DICOM images from this orthanc server using spark. As per orthanc documentation only ways to download DICOM images is via the orthanc UI or via the API, the images that I have on PACS could go over 1 GB which makes API bit unreliable.
The other method I tried is to retrieve from the table in MySQL server,“StorageArea” is the name of the table, which has a content column which holds the entire DICOM image in the HEX format.I tired querying this table via spark and convert the column into string but all I got was garbage value.The HEX value should ideally decode to a DICOM image.
Have you considered downloading ZIP archives (which will by default create a stream since Orthanc 1.9.4), hereby mitigating possible memory issues), or using WebDAV?
Thanks for the reply, this seems to be a good implementable solution but my requirement is to automate this solution(no human interventions) for that I have few questions.
Will WebDAV store data in the DICOM format.
Is WebDAV just an abstraction layer over RDBMS or does it make a new copy of the DICOM images.
That is amazing!
On another note, if I were to query the MySQL (StorageArea->content column), how can I convert this to “.dcm” format?
Right now I see it in blob/binary format.
Thanks for the link but what I want is, how have you encoded the DICOM image and stored it in MySQL,I was able to get the encoded image data from MySQL but not able to decode it to DICOM format.
Those are off,I cross checked with the AttachedFile table, my compressed and uncompressed size are same.As one more level on validation, uploaded size was same as compressed size.
Data is stored in a blob, which will be an array.I need help to convert this array to DICOM without the help of API.
Content column contains the image information only, not the tags,it is located in another table.
Using the store procedure I can get the image from content column.
My requirement was to get the DICOM as a whole, that is why I asked you again.
Also while I was reading you previous conversations, I wanted to ask few more questions:-
1.If I do not use any databases, .json files are stored in OrthancStorage but where are the images stored?
2.If using RDBMS, MySQL do I get the option to toggle enableStorage to false?