Orthanc peer transfer and attachments

Hi everybody,

Is it possible to automatically transfer any attachment(s) stored within a patient/study/series/instance level in Orthanc A during a peer transfer to Orthanc B ?
For example, a radiology report pdf attached to a study level in Orthanc A could be retrieved as attachment to study level in Orthanc B after peer transfer A->B …

Thanks.

Best regards

Everything included should be transferred. I have had images that Orthanc cannot view/understand but were transferred via peer. Unless you are meaning some other sort of attachment within a study, you’d have to explain.

I was meaning attachments like pdf or json file…

In the orthanc book (section Terminology of advanced features), you can define your own user_defined attachements.

For example, for a pdf file

$ curl http://OrthancA:8042/studies/cb855110-5f4da420-ec9dc9cb-2af6a9bb-dcbd180e/attachments/1025 -X PUT --data-binary @sample.pdf

I managed successfully to set my own attachment pdf file but during a peer transfer this attachment is not sent to Orthanc B ( no attachment data is returned by
$ curl http://OrthancB:8042/studies/"studyUID"/attachments/1025/data)

So are attachment transfered while peer transfer by default ? Is some modification of configuration.json needed to allow it?

Thanks.

Attachments and metadata are local to the Orthanc server, and are thus not transferred through the peers mechanism:

“Also note that metadata and attachments are only available for resources stored inside Orthanc. Once one DICOM instance leaves the Orthanc ecosystem, its associated metadata and attachments are lost.”
http://book.orthanc-server.com/faq/features.html

In your case, you should DICOM-ize the PDF report.

Regards,
Sébastien-

Thanks Sébastien for your quick answer and congratulations for your amazing work!

Is there a way to dicomize a pdf by the REST API or should I use command line tools like dcm4che / DCMTK pdf2dcm tools ?

“Also note that metadata and attachments are only available for resources stored inside Orthanc. Once one DICOM instance leaves the Orthanc ecosystem, its associated metadata and attachments are lost.”
Do you think the functionnality of transferring metadata/attachments to peers could be implemented in a next release or not (with a configuration allowing these feature in configuration.json or by the REST API ‘…/peers/’ + peer + ‘/store?attachments=true’ ?

Regards,

Cédric

Hello,

It is possible to DICOM-ize a PDF using the REST API. Check out the “test_create_pdf” integration test:
https://bitbucket.org/sjodogne/orthanc-tests/src/a491d5ec370a62059cadc5b348e41cb21fc96aa9/Tests/Tests.py#lines-2474

Regarding the transfers of metadata/attachment, no, this is a feature. You can manually transfer such an information using the REST API.

S-