Transfers accelerator plugin

642 views
Skip to first unread message

Sébastien Jodogne

unread,
Mar 4, 2019, 12:00:45 PM3/4/19
to Orthanc Users
Dear Orthanc community,

It is my pleasure to announce the official release of a new Orthanc plugin courtesy of Osimis, thanks to the funding from one of our industrial partners.

The "transfers accelerator" plugin provides an efficient way to transfer DICOM files securely over Internet through the HTTP/HTTPS protocol. This plugin improves the Orthanc peers mechanism, by providing parallel transfers, chunking of DICOM files, and a form of storage commitment.

Full documentation is available at the following location:

Source code and precompiled binaries for Windows 32bit are available at the following location:

A new version of the Osimis installers including this new plugin will soon be available.

We warmly acknowledge our industrial sponsor for making this development possible to the benefit of the global community of medical imaging!

Kind Regards,
Sébastien-

Ric Smi

unread,
Mar 4, 2019, 1:07:38 PM3/4/19
to Orthanc Users
Thank you Sébastien for a wonderful announcement!  This is really exciting news!

Question, could please guide us how the call would be for this new feature under Lua scripting?  Currently, at high traffic location we are using RestApiPost('/peers/{peer}/store', instanceId).

Thank you for your attention!

Regards,

Sébastien Jodogne

unread,
Mar 4, 2019, 3:22:38 PM3/4/19
to Orthanc Users
This is explained in the documentation (check out "sample command line to send the same patient to the remote peer"):
Message has been deleted

Ric Smi

unread,
Mar 4, 2019, 7:19:15 PM3/4/19
to Orthanc Users
I apologize if I didn't ask the question clearly. 

Since this new feature can bundle instances together as group, my question is how can we write a Lua script on OnStableStudy() to send entire study at once via this new feature?

In other words, convert following line into Lua?

$ curl -v http://localhost:8042/transfers/send -X POST -d '{"Resources":[{"Level":"Patient","ID":"16738bc3-e47ed42a-43ce044c-a3414a45-cb069bd0"}],"Compression":"gzip","Peer":"remote"}'

Many thanks!

Sébastien Jodogne

unread,
Mar 5, 2019, 12:42:58 AM3/5/19
to Orthanc Users
PEER = 'b'

function OnStableStudy(studyId, tags, metadata)
   print('This study is now stable: ' .. studyId)
     
   local transfer = {}
   transfer['Resources'] = {}
   transfer['Resources'][1] = {}
   transfer['Resources'][1]['Level'] = 'Study'
   transfer['Resources'][1]['ID'] = studyId
   transfer['Compression'] = 'gzip'
   transfer['Peer'] = PEER
  
   local job = ParseJson(RestApiPost('/transfers/send',
                                     DumpJson(transfer, true)))
   print('Transfer job has been added to the queue: ' .. job['ID'])
end

Ric Smi

unread,
Mar 5, 2019, 10:02:05 AM3/5/19
to Orthanc Users
This is fantastic!  I couldn't wait to try this out.

I will report my findings.

Thank you so much!!!

Best regards,

Ric Smi

unread,
Mar 5, 2019, 10:09:55 AM3/5/19
to Orthanc Users
I have question on this...

Since, the Accelerator plugin uses HTTP PUT request shouldn't we be using HttpPut() for "push" mode instead of RestApiPost()?

Thank you!

Sébastien Jodogne

unread,
Mar 5, 2019, 11:53:58 AM3/5/19
to Orthanc Users
As written in the Orthanc Book, transfers are triggered by HTTP POST, so it is normal to use "RestApiPost()":

Ric Smi

unread,
Mar 5, 2019, 1:49:40 PM3/5/19
to Orthanc Users
Thank you for the answer.  That was good for my learning.

I now will wait for the new release to test this new feature out.

Thank you with best regards,

Salim Kanoun

unread,
Mar 10, 2019, 12:15:17 PM3/10/19
to Orthanc Users
Thank you so much Sebastien,

I was waiting for this plugin to add in my project that we will announce in some months.

With this kind industry sponsored open source plugin, you definitely opened a new era in software and medicine, bringing innovation, interoperability and freedom for users.

Thanks for doing all of this !

Sébastien Jodogne

unread,
Mar 13, 2019, 12:34:53 PM3/13/19
to Salim Kanoun, Orthanc Users
Thanks for your support! :-)

Kind regards,
Sébastien-

Michael Shen

unread,
Apr 26, 2019, 4:47:17 PM4/26/19
to Orthanc Users
So I have an application where the transfer chain is: Modality ---(DICOM)---> Orthanc server 1 ----(transfer accelerator)----> Orthanc server 2 ----(transfer accelerator)----> Orthanc server 3

The Lua Script below works great for the Modality ---(DICOM)---> Orthanc server 1 ----(transfer accelerator)----> Orthanc server 2, but it doesn't make it to Orthanc server 3.

It seems 'function OnStableStudy(studyId, tags, metadata)' isn't triggered after receiving a transfer accelerator study.

Is the a Lua function that is triggered on completion of receiving a transfer accelerator study?

Thanks for any help.

Code:

PEER = 'b'

function OnStableStudy(studyId, tags, metadata)
   print('This study is now stable: ' .. studyId)
      
   local transfer = {}
   transfer['Resources'] = {}
   transfer['Resources'][1] = {}
   transfer['Resources'][1]['Level'] = 'Study'
   transfer['Resources'][1]['ID'] = studyId
   transfer['Compression'] = 'gzip'
   transfer['Peer'] = PEER
   
   local job = ParseJson(RestApiPost('/transfers/send',
                                     DumpJson(transfer, true)))
   print('Transfer job has been added to the queue: ' .. job['ID'])
end

On Wednesday, March 13, 2019 at 12:34:53 PM UTC-4, Sébastien Jodogne wrote:
Thanks for your support! :-)

Kind regards,
Sébastien-


On Sun, 10 Mar 2019 at 17:15, Salim Kanoun <salim...@gmail.com> wrote:
Thank you so much Sebastien,

I was waiting for this plugin to add in my project that we will announce in some months.

With this kind industry sponsored open source plugin, you definitely opened a new era in software and medicine, bringing innovation, interoperability and freedom for users.

Thanks for doing all of this !


Michael 

Bryan Dearlove

unread,
Apr 26, 2019, 8:11:52 PM4/26/19
to Orthanc Users
Quickly answering your one question, OnStableStudy does work on a receiving device using transfer accelerator. I have a HTTP Post script working, a test is to do a PrintRecursive and you'll see that record in your logs. 

Michael Shen

unread,
Apr 27, 2019, 12:59:44 AM4/27/19
to Orthanc Users
Thanks Bryan. I'll take a closer look at the log file and see what is happining. Thanks.

Michael

Reply all
Reply to author
Forward
0 new messages