Dynamically alter CallingAE title to match RemoteAE with lua scripts

hi there,

i’d like to change the orthanc sending AE title dynamically with lua scripts - is this possible.

if i have say two modalities sending to orthanc routing to different places, i’d like orthanc to appear to the final destination as having not been there.

ie. i wan’t an lue script to pickup the RemoteAE title (from the sending modality), and replace the ORTHANC calling AE title with that RemoteAE title when forwarding to the destination. Is that possible.

Here’s a diagram if that helps. (if it doesn’t justify properly, i’ve attached a screenshot!)

WHAT’S HAPPENING NOW

Sending modality -------------------------------------> ORTHANC ------------------------------------> FinalDestination
RemoteAE = SNDMODAL CallingAE = ORTHANC
CalledAE = ORTHANC CalledAE= DESTMODAL

DESIRED OUTCOME

Sending modality -------------------------------------> ORTHANC --------------------------------------> FinalDestination
RemoteAE = SNDMODAL CallingAE = SNDMODAL*
CalledAE = ORTHANC CalledAE= DESTMODAL

*change this with LUA script to match original RemoteAE

thanks!

Capture.JPG

Hello,

Couldn’t you simply set the AET of Orthanc to “SNDMODAL”? This can be set in the configuration file (option “DicomAet”):
https://code.google.com/p/orthanc/wiki/OrthancConfiguration

Indeed, Orthanc accepts by default all the incoming C-Store connections, issued from any host, so it will receive all the files sent from your “sending modality”.

HTH,
Sébastien-

hi,

no, that wasn’t the question. i would like the DicomAet for orthanc to appear as the original modality AET.

currently images sent from SNDMODALa and SNDMODALb through orthanc, all appear at the final destination as having come from the same AET (ORTHANC (or whatever i set DicomAet to be in the config file)).

i want the final destination to see the images as having come from the original AE titles. ie. overriding the config file value for DicomAet on the fly.

Being able to change the calling AE from LUA would be a great addition to Orthanc.

Regards,
Robert

OK, got it.

Just added a task on the roadmap:
https://trello.com/c/mFKOZsfc

Sébastien-

Hello,

This feature is now implemented in the mainline, and will be part of the 0.9.1 release:
https://code.google.com/p/orthanc/source/detail?r=d710ea64f0fd1cb3b548ad6058b9b61b7a62987a

It is accessible both from Lua scripts and from the REST API. You can find some sample calls as a part of the official integration tests:
https://bitbucket.org/sjodogne/orthanc-tests/commits/040f6ef1394a5e7762755b717ccdc92a624354b8

Sébastien-