DICOM Testing with DVTk

Last update : January 10, 2020

DVTk history

DVTk is an open source project for testing, validating and diagnosing communication protocols and scenarios in medical environments. It supports DICOM and IHE integration profiles. The project started in 1997 by Philips and was joined by Agfa in 2001. In 2005, DVTk was open sourced and one year later ICT Automatisering joined the open source community. In 2009 Agfa left the project.

The following tools are currently free available from the DVTK.org website or from GitHub :

  • DICOM Compare, v 5.0.0
  • DICOM Editor, v 5.0.2
  • DICOM Network Analyzer, v 5.0.1
  • DVT Validator, v 5.0.3
  • Query Retrieve SCP Emulator, v 5.0.1
  • RIS Emulator, v 5.0.0
  • Storage SCP Emulator, v 5.0.2
  • Storage SCU Emulator, v 5.0.1

DVTk Tests

I used these tools in the context of the development of an education tool for radiologists called RadioLogic. I edited the following script to execute an ECHO test and a STORE-SCP test with the Orthanc DICOM Server, version 0.9.5 :

# DVT Dicom Script
SESSION
SESSION-TYPE emulator
SESSION-FILE-VERSION 1
# Product Test Session Properties
SESSION-TITLE "Orthanc Server"
SESSION-ID 001
MANUFACTURER "Manufacturer"
MODEL-NAME "Product Name"
SOFTWARE-VERSIONS "Version 1.0"
APPLICATION-ENTITY-NAME "ORTHANC"
APPLICATION-ENTITY-VERSION "0.9.5"
TESTED-BY "Marco Barnig"
DATE "20151208"
# SUT ACSE Properties
SUT-ROLE acceptor
SUT-AE-TITLE "ORTHANC"
SUT-MAXIMUM-LENGTH-RECEIVED 16384
SUT-IMPLEMENTATION-CLASS-UID ""
SUT-IMPLEMENTATION-VERSION-NAME ""
# DVT ACSE Properties
DVT-AE-TITLE "DVTK_STR_SCU"
DVT-MAXIMUM-LENGTH-RECEIVED 16384
DVT-IMPLEMENTATION-CLASS-UID "1.2.826.0.1.3680043.2.1545.1"
DVT-IMPLEMENTATION-VERSION-NAME "DVT2.6"
# Socket Properties
SUT-HOSTNAME "localhost"
SUT-PORT 4242
DVT-PORT 104
DVT-SOCKET-TIMEOUT 30
USE-SECURE-SOCKETS false
TLS-VERSION "TLSv1"
CHECK-REMOTE-CERTIFICATE true
CIPHER-LIST "aRSA+kRSA+SHA1+eNULL:@STRENGTH:-SSLv2"
CACHE-TLS-SESSIONS true
TLS-CACHE-TIMEOUT 300
CREDENTIALS-FILENAME ""
CERTIFICATE-FILENAME ""
# Test Session Properties
LOG-ERROR true
LOG-WARNING true
LOG-INFO true
LOG-RELATION false
LOG-DEBUG false
LOG-DULP-STATE false
LOG-SCP-THREAD true
PDU-DUMP false
STORAGE-MODE as-media
STRICT-VALIDATION false
DETAILED-VALIDATION-RESULTS true
SUMMARY-VALIDATION-RESULTS true
INCLUDE-TYPE-3-NOTPRESENT-INRESULTS false
AUTO-TYPE-2-ATTRIBUTES true
DEFINE-SQ-LENGTH false
ADD-GROUP-LENGTH false
# Supported Transfer Syntaxes
SUPPORTED-TRANSFER-SYNTAX "1.2.840.10008.1.2"
SUPPORTED-TRANSFER-SYNTAX "1.2.840.10008.1.2.2"
SUPPORTED-TRANSFER-SYNTAX "1.2.840.10008.1.2.1"
# Configurable Delay between N-Action and N-Event Command
DELAY 10
# Definitions
DEFINITION-DIRECTORY "%COMMONPROGRAMFILES%\DVTk\Definition Files\DICOM\"
DEFINITION "All DIMSE Commands.def"
DEFINITION "CT Image Storage.def"
DEFINITION "Digital X-Ray Image Storage - For Presentation.def"
DEFINITION "Digital X-Ray Image Storage - For Processing.def"
DEFINITION "Enhanced CT Image Storage.def"
DEFINITION "Enhanced MR Image Storage.def"
DEFINITION "Media Storage Directory.def"
DEFINITION "MR Image Storage.def"
# Results
RESULTS-ROOT ".\results\"
APPEND-TO-RESULTS-FILE false
# DICOMScript Description Directory
DESCRIPTION-DIRECTORY ".\html\"
ENDSESSION

Scripts are saved as text files with the extension .ses. Several scripts can be referenced in an xml-project file with the extension .pdvt.

The following figure shows the resulting settings in the DVTk session panel :

Session

DTVk DICOM validator session panel

By double-clicking on the Storage-SCU-emulator link at the left, a window pops up allowing to do an ECHO test or to send a DICOM file to the Orthanc server. The exchanged messages are displayed in the Activity Logging panel :

DVT

DVTk Activity Logging

After the succesful sending of a DICOM file to the Orthanc server, a summary of the validation results is shown in the Validation Results panel :

DVT

DVTk Validation Results

In verbose mode, the Orthanc Server provides the following releated messages in the command window :

Orthanc Server output in verbose mode

Orthanc Server output in verbose mode

DVTk Network Sniffer

The next figure shows the results of the DVTk network sniffer analyzing the DICOM traffic between the OSIRIX HD viewer on iPad with the ORTHANC DICOM server (version 0.9.6) running on Window 8.1.

DVTk

DVTk summary results of FIND Request sent by Osirix HD from iPad

I entered only the first characters of the patient name to send a FIND query. DVTk reports four errors in the C-FIND communication because the following data elements are not valid :

  • (0008, 0018) : SOP Instance UID > should be present with at least a zero length
  • (0010, 0020) : Patient ID > should be present with at least one value
  • (0020, 000D) : Study Instance UID > should be present with at least one value
  • (0020, 000E) : Series Instance UID > should be present with at least one value

The C-MOVE communication works without errors and the received results displayed in Osirix HD are correct.

DVTk

DVTk reports no errors in the C-MOVE communication between Osirix HD and Orthanc

The Orthanc server shows no specific error message in the command window.

The OSIRIX HD viewer is configured as follows :

  • Remote AET : ORTHANC
  • IP : 192.168.178.26
  • Port : 4242
  • AETitle : OSIRIXHD
  • IP : 192.168.178.65
  • Port : 4096
  • Transfer Syntax : Implicit Little Endian (preferred syntax by Orthanc)
  • Encoding : ISO IR 100 (Latin-1)
  • Protocol : C-MOVE
  • Timeout : 90 sec

Communication Failure

The next example shows the case of a failed communication. The C-FIND query sent by the PACS DICOM iPad app to the Orthanc server (version 0.9.6) is aborted with a DIMSE failure. The query is identical to the C-FIND request sent by Osirix HD. The Orthanc log signals “DIMSE No data available (timeout in none-blocking mode)”.

PACS DICOM

Orthanc log messages related to a C-FIND command sent by the PACS DICOM app

The DVTk network analyzer shows the same four errors as in the case of the Osirix communication. After a timeout, the communication is aborted.

DVTk

DVTk signals an Abort Request in the PACS DICOM – Orthanc association

The PACS DICOM viewer is configured as follows :

  • Server AET : ORTHANC
  • Host Name/IP : 192.168.178.26
  • Server Port : 4242
  • Local AET : TEST-SCU
  • Device IP Address : 192.168.178.65
  • Local Port : 4096
  • Protocol : C-MOVE

A deeper analysis is required to identify the reason of the abort request. If the problem is caused by a non-valid parameter in the C-FIND query, the recently proposed LUA script filter will be an excellent remedy.