DICOM echo

From I Do Imaging Wiki
Jump to: navigation, search

Introduction

A DICOM echo (or ping) is a simple test of connectivity between you and a remote DICOM node. It sends a short query to the node and reports on the success of the connection. DICOM echo is at a higher level than TCP ping, which tests whether a connection can be made to a remote computer.

The C-ECHO protocol is defined in DICOM PS3.7 9.3.5

For a DICOM echo to be successful, all the following conditions must be true:

  • The remote computer must be reachable (test with TCP ping)
  • The DICOM node on the remote computer must be running, accept echo requests, and be correctly configured (AE Title and port)
  • The firewall on the remote end must be configured to open the DICOM port used by the remote node
  • Your testing software must use the correct address, AE Title, and port number of the remote node

Software

  • Many DICOM viewing applications have an echo/ping/test facility built in.
  • echoscu, part of the DCMTK toolkit. Command line, all platforms.
  • storescu, part of the dcm4che3 toolkit. Command line, all platforms.

Testing

RadiAnt

Open Search and download studies, then click on the gear icon to open the PACS configuration window. Configure or select the PACS location to test, and click the green arrow. The line with the tested PACS location will turn green for success, yellow for failure.

Radiant echo.jpg

Osirix / Horos

From the Locations control panel, click Verify. Failing locations will appear in orange.

Horos echo.jpg

Command Line

echoscu (DCMTK)

A successful call will return silently with a return code of 0:

$ /opt/dcmtk/bin/echoscu --call DCM4CHEE pacs.idoimaging.com 11112
$ echo $?
0

An unsuccessful call will print an error message and return with a non-zero return code:

$ /opt/dcmtk/bin/echoscu --call BAD_AETITLE pacs.idoimaging.com 11112
F: Association Rejected:
F: Result: Rejected Permanent, Source: Service User
F: Reason: Called AE Title Not Recognized
$ echo $?
1

storescu (dcm4che3)

A successful call will return masses of output with a return code of 0:

$ /opt/dcm4che/bin/storescu -c DCM4CHEE@pacs.idoimaging.com:11112
15:23:14,759 INFO  - Initiate connection from 0.0.0.0/0.0.0.0:0 to pacs.idoimaging.com:11112
15:23:14,789 INFO  - Established connection Socket[addr=pacs.idoimaging.com/23.22.202.152,port=11112,localport=52732]
... omit 50 lines of output ...
15:23:14,933 INFO  - STORESCU->DCM4CHEE(1) >> A-RELEASE-RP
15:23:14,933 INFO  - STORESCU->DCM4CHEE(1): close Socket[addr=pacs.idoimaging.com/23.22.202.152,port=11112,localport=52732]
15:23:14,933 DEBUG - STORESCU->DCM4CHEE(1): enter state: Sta1 - Idle
$ echo $?
0

An unsuccessful call will print an error message and return a non-zero code:

$ /opt/dcm4che/bin/storescu -c BAD_AETITLE@pacs.idoimaging.com:11112
15:24:50,706 INFO  - Initiate connection from 0.0.0.0/0.0.0.0:0 to pacs.idoimaging.com:11112
15:24:50,892 INFO  - Established connection Socket[addr=pacs.idoimaging.com/23.22.202.152,port=11112,localport=52759]
... omit 20 lines of output ...
15:24:50,934 WARN  - STORESCU->BAD_AETITLE(1): Failed to write A-ASSOCIATE-RQ, will abort association
storescu: A-ASSOCIATE-RJ[result: 1 - rejected-permanent, source: 1 - service-user, reason: 7 - called-AE-title-not-recognized]]
A-ASSOCIATE-RJ[result: 1 - rejected-permanent, source: 1 - service-user, reason: 7 - called-AE-title-not-recognized]]
	at org.dcm4che3.net.PDUDecoder.nextPDU(PDUDecoder.java:182)
...
	at java.lang.Thread.run(Thread.java:745)
$ echo $?
2

Other References