Add 'interact' option or button to study or series detail page

Hi all,

What would be the easiest way to customize Orthanc to add a button or link in the interact box of the study or series detail page. The option should open a new URL in which we want to pass configurable DICOM tags. This URL will point to an external web application.

Thanks for you help!
Coert Metz

The easiest way is to Copy the orthanc explorer files from the project source.
Modefiy it as you like.
Thin use it under serve folders plugin.

1 Like

Hello,

C/C++ plugins can add new buttons in the Orthanc Explorer interface (that is built on the top of jQuery Mobile):
https://book.orthanc-server.com/developers/creating-plugins.html

Check out the function “OrthancPluginExtendOrthancExplorer()” in the Orthanc SDK:
https://sdk.orthanc-server.com/group__Toolbox.html#ga5e116d4099c329148e3ae2f9e59726ee

You can find working examples of this function in the Orthanc Web viewer plugin, in the WSI plugin, in the DICOMweb plugin, and in the transfers accelerator plugin:
https://bitbucket.org/sjodogne/orthanc-webviewer/src/5d15a86bad2695ca820c980db46ad645c9e1913c/Plugin/Plugin.cpp#lines-703

https://bitbucket.org/sjodogne/orthanc-webviewer/src/default/Resources/OrthancExplorer.js
https://bitbucket.org/sjodogne/orthanc-wsi/src/11413cc2b9d6bfec068ffd6be04e4fcf1f7af2c9/ViewerPlugin/Plugin.cpp#lines-342

https://bitbucket.org/sjodogne/orthanc-wsi/src/default/ViewerPlugin/OrthancExplorer.js

https://bitbucket.org/sjodogne/orthanc-dicomweb/src/e944c31eda6c4b673ad52ab56706efb6cf48ed9f/Plugin/Plugin.cpp#lines-538

https://bitbucket.org/sjodogne/orthanc-dicomweb/src/default/Plugin/OrthancExplorer.js

https://bitbucket.org/sjodogne/orthanc-transfers/src/7d56105ab084c0e29a2f0b45ccda1aa5b4eaf4bb/Plugin/Plugin.cpp#lines-699

https://bitbucket.org/sjodogne/orthanc-transfers/src/default/Resources/OrthancExplorer.js

HTH,
SĂ©bastien-

Hi @jodogne, I tested this feature using the Python plugin

if change_type == ct.ORTHANC_STARTED:
    with open("OrthancExplorer.js", "r") as f:
        js = f.read()
    orthanc.ExtendOrthancExplorer(js)

and it does work in the original Orthanc Explorer. However, I can’t see anything in the Orthanc Explorer 2. I always get the same five icons (Download, delete, etc.) wathever I do. Is it possible to add icons in v2? Is there documentation somewhere?

Hello,

No, the orthanc.ExtendOrthancExplorer() method is only applicable to Orthanc Explorer 1.

Actually, the Orthanc SDK only knows about Orthanc Explorer 1, since it is the only interface that is built in the Orthanc server. This is because Orthanc Explorer is targeted at the core developers of Orthanc, which provides a way for us to test plugins.

Other Web interfaces such as Orthanc Explorer 2 are unknown to the core of the Orthanc server, and thus cannot be exposed in the Orthanc SDK. Other Web interfaces implemented as plugins have to provide their own extension mechanisms (which could for instance consist in reading specific routes in the REST API that could be added by Python plugins, or by providing specific configuration options for the plugin).

Kind Regards,
SĂ©bastien-

That was a long time ago.