DICOM with Orthanc PACS server

Introduction

This project, written by Lev Blum, demonstrates using WADO (Web Access DICOM Objects) with RESTful API web calls to move DICOM files between two Orthanc DICOM servers. It also performs standard CRUD (Create Read Update Delete) operations. The channel includes a Configuration web page to manage the example.

This project gives you the necessary tools for moving DICOM images between DICOM/PACS servers. The key item here is the WADO RESTful API that allows you to send DICOM commands using standard web calls (put, get, post etc). If your DICOM/PACS server already supports WADO you can adapt the code in this example to communicate directly with your server. If your DICOM/PACS server does not yet support WADO you can install a (very lightweight) Orthanc server and talk to it using WADO and get Orthanc to issue DICOM commands to your servers.

The project also demonstrates our continued support of the Iguana DICOM DLL (dicom_raw.dll). This means any code you have that uses this DLL will continue to run unchanged in Iguana 6.0.5. The DICOM DLL is only used to manipulate DICOM file header tags (it cannot manipulate images or send DICOM commands). Using the dicom_raw.dll with Iguana 6.0.5 and later requires that the mscvrt120.dll is installed on your Windows OS. Please be aware that you can also manipulate DICOM header tags using WADO, so it is no longer necessary to use the dicom_raw.dll at all (it is mainly for historical support).

We use a production ready, high performance version of the Orthanc executable which is compiled with java debug assertions disabled (unlike the downloadable version version of Orthanc which is compiled with java debug assertions enabled). This follows the “Performance Warning” advice on the Orthanc compile instructions web page.

For questions about how to create your own DICOM solution please contact us at support@interfaceware.com.

Note: This example project only runs on the Windows operating system, but it can easily be adapted for Iguana production systems on Linux and OSX.

It is also worth mentioning that Orthanc officially supports Windows, Linux and OSX.

Using the Code [top]

  • Import the DICOM with Orthanc PACS server channel from the Builtin: Iguana DICOM repository
  • Use the configuration web page to setup and run the example
  • Experiment with the code to find out how it works
  • Adapt the code to your own requirements
  • Interactive scripting help is included for shared modules in this project

This is the github code for the main module in the Filter component:

Configuration web page [top]

This project includes a Configuration web page to make it easier for you to try out the example. The default URL for the this page is http://localhost:6544/wado/ but it may vary depending on you Iguana install.

You can find the URL in the Source component properties:

Procedure for using this channel:

  • Open the Configuration web page (identified above)
  • Setup the example by clicking the three Execute links for:
    • Download Files
    • Build Environment
    • Import Sample Data
  • Check the first Orthanc server Dashboard:
    • Click the ORTHANC 1st Explorer link
    • The Dashboard should show one sample Patient
  • Check the second Orthanc server Dashboard:
    • Click the ORTHANC 2nd Explorer link
    • The Dashboard should show no sample data
  • Execute this project in the Iguana Editor:
    • Click the Login to Iguana link this will open this will open the Filter component main module
    • Wait a few seconds until the code executes, then examine the annotations to find out how things get calculated
  • Check the second Orthanc server Dashboard to see the uploaded Patient data:
    Note: Iguana performs a C-STORE command using ORTHANC1 to transfer data to ORTHANC2

    • Click the ORTHANC 2nd Explorer link (or refresh the page if it is already open)
    • The Dashboard should now show one sample Patient
  • To reset the environment (so you can run the example setup again):
    Note: This stops both Orthanc servers, then deletes installed files and the sample data

    • Click the Reset this example link at the bottom of the page

WADO solution architecture [top]

We present three possible structures to help understand what you can achieve with WADO and Orthanc. All three solutions use WADO to communicate with DICOM/PACS servers.

Use WADO with Orthanc servers

This is the structure that we use to demonstrate WADO in our sample channel. This solution is unlikely to be used in production, as most companies will already using a different DICOM/PACS server and will be unwilling to change to Orthanc.

Use WADO with any WADO enabled DICOM/PACS servers

This structure is the same as our sample channel, but using another (not Orthanc) WADO enabled DICOM/PACS server. This is the ideal production solution, if your DICOM/PACS server already supports WADO. It will be very easy to adapt our example to work with other WADO enabled servers.

Use WADO with an Orthanc server that controls other DICOM/PACS servers

This structure is different from our sample channel, but it still simplifies the process by using WADO to communicate across the internet. This is a possible production solution, if your DICOM/PACS server does not yet support WADO. This solution is quite different from our example and will require more work to implement (but it is still much easier than generating DICOM within Iguana).

Using the Iguana DICOM DLL [top]

This channel also demonstrates use of the Iguana DICOM DLL (dicom_raw.dll). Please be aware that you can also manipulate DICOM header tags using WADO, so it is no longer necessary to use the dicom_raw.dll at all (it is mainly for historical support).

A prerequisite for using the iNTERFACEWARE’s dicom_raw.dll is that you have (the correct version of) the mscvrt120.dll installed on your Windows OS. This is included in the “Visual C++ Redistributable Packages for Visual Studio 2013” which can be downloaded from https://www.microsoft.com/en-ca/download/details.aspx?id=40784.

Within the Filter component the local module dicomedit.lua uses the dicom_raw.dll:

It contains a single function dicomedit.edit() that is called once (for demonstration purposes) from line 56 of the main module.

The best way to understand how this works is simply to look at the code and inspect the annotations.

Tip: If you are not going to use the dicom_raw.dll you can simply comment out the dicomedit.edit() call on line 56 in the main module.

This also means that you will not need to download and install the “Visual C++ Redistributable Packages for Visual Studio 2013”.

How it works [top]

When you first run the channel in the Dashboard:

  • It creates two Orthanc servers, ORTHANC1 and ORTHANC2
  • The (default) Dashboards URLs for these servers are:
  • The channel also uploads sample DICOM image data to ORTHANC1
    Note: We monitor the ORTHANC1 dashboard to confirm that the data is uploaded

When you run the code in the channel:

  • It uses a C-STORE command to transfer DICOM image data from ORTHANC1 to ORTHANC2
    Note: We monitor the ORTHANC2 dashboard to confirm that the data is uploaded

More information [top]

Orthanc citation

Jodogne:ISBI2013
Authors: S. Jodogne and C. Bernard and M. Devillers and E. Lenaerts and P. Coucke
Title: Orthanc — A Lightweight, RESTful DICOM Server for Healthcare and Medical Research
Booktitle: Biomedical Imaging (ISBI), IEEE 10th International Symposium on
Pages: 190-193,
Published: Apr 2013
Request pdf Copy: http://orbi.ulg.ac.be/handle/2268/163949

Leave A Comment?