DCMTK - The OFFIS DICOM ToolKit for Debian
==========================================

General notes:

DCMTK is a collection of libraries and applications implementing large
parts the DICOM standard. It includes software for examining,
constructing and converting DICOM image files, handling offline media,
sending and receiving images over a network connection, as well as
demonstrative image storage and worklist servers. DCMTK is written
in a mixture of ANSI C and C++. It comes in complete source code and
is made available as "open source" software under BSD like license
terms.  For additional information about DCMTK have a look at the
OFFIS web page:

   http://dicom.offis.de/dcmtk.php.en

DCMTK has been used at numerous DICOM demonstrations to provide
central, vendor-independent image storage and worklist servers (CTNs -
Central Test Nodes).  It is used by hospitals and companies all over
the world for a wide variety of purposes ranging from being a tool for
product testing to being a building block for research projects,
prototypes and commercial products.

DCMTK optionally supports some of the DICOM security extensions and
relies on the free OpenSSL toolkit for the underlying cryptographic
routines and the TLS protocol implementation. The Debian DCMTK package
has been built with OpenSSL support enabled.

More information about using the DCMTK network applications for secure
DICOM communication can be found in

   /usr/share/docs/dcmtk/ciphers.txt
   /usr/share/docs/dcmtk/randseed.txt

DCMTK optionally supports Wietse Venema's TCP wrappers library
(libwrap) which is freely available for most Unix platforms and part
of the default installation of most recent Linux distributions.  This
library allows one to enforce host-based access control via the
"/etc/hosts_deny" and "/etc/hosts_allow" configuration files. The
Debian DCMTK package has been compiled with TCP wrapper support
enabled.  See hosts_access(5) man page for details.

You can use the dcmnet applications for testing DICOM connectivity. A
brief description can be found in

   /usr/share/docs/dcmtk/testing.txt


The DCMTK dcmqrscp application implements a DICOM image
storage/query/retrieve SCP which has been designed primarily as an
independent framework for cooperative tests and demonstrations of
DICOM connectivity by medical imaging vendors. If you want to set up
dcmqrdb as a DICOM image storage server please read both the dcmqrscp
manual pages and the supplemental documentation in

   /usr/share/doc/dcmtk/dcmqrcnf.txt
   /usr/share/doc/dcmtk/dcmqrset.txt

The dcmqrscp application can be invoked as a daemon process at boot
time by setting DCMQRSCP_ENABLE=Yes in /etc/defaults/dcmqrscp. You will
have to adjust the system wide configuration file
/etc/dcmtk/dcmqrscp.cfg to suit your needs.  This configuration file
provides optional UserName/GroupName keywords in the "Global
Parameter" section (see note in dcmqrcnf.txt). Running dcmqrscp with
root privileges is strongly discouraged.  A dedicated system
user/group dcmtk/dcmtk is automatically added during the installation
of the Debian DCMTK package.  It is important to note that dcmqrscp is
primarily intended to be used as a demonstration server rather than a
real "PACS replacement". Scalability is quite limited, both in terms
of number of images/studies and in number of parallel clients. If you
want to set up a real large database, you might be better off in using
an SQL based archive (such as the Mallinckrodt CTN).


DCMTK supports the Modality Worklist Management SOP Class as a SCP, which
allows modalities to query and retrieve worklist information from hospital
information systems. An example worklist database along with a set of 
example queries can be found in 

   /usr/share/doc/dcmtk/examples/wlistdb

and

   /usr/share/doc/dcmtk/examples/wlistqry.
 
Here is a brief instruction about how to make this work (based on a post
of Thomas Wilkens in comp.protocols.dicom):

1. Use dump2dcm to convert all "*.dump" files in examples/wlistdb/OFFIS
to "*.wl" files (DICOM format):

  $ for f in *.dump; do dump2dcm "$f" "${f%.dump}".wl; done

Note that these files have to have the extension "*.wl", otherwise wlmscpfs 
will not find these files. These files represent your worklist database.
2. Use dump2dcm to convert all "*.dump" files in examples/wlistqry to
"*.dcm" files (DICOM format):

  $ for f in *.dump; do dump2dcm "$f" "${f%.dump}".dcm; done
   
These files represent possible queries that can be used to query the worklist 
database.
3. In one shell run the following command to start the worklist management SCP:

  $ wlmscpfs -v -dfp examples/wlistdb 1234

4. In another shell run the following command to send a certain query to the 
WLM SCP:

  $ findscu -v --call OFFIS localhost 1234 examples/wlistqry/wlistqry0.dcm 

Step 3 will start the worklist management SCP which will listen on port 1234
for incoming C-FIND RQ messages. The "-dfp examples/wlistdb" option
specifies that the worklist database can be found in folder "examples/wlistdb". 
Note that the worklist database can be organized in different storage areas. 
Subfolder "OFFIS" below "examples/wlistdb" is one (the only one in this case) 
storage area. In an incoming C-FIND RQ, an SCU has to tell wlmscpfs which 
storage area shall be queried; this is done by sending a certain "called AE title" 
to wlmscpfs.

Step 4 will send the query in file "examples/wlistqry/wlistqry0.dcm"
using a C-FIND-RQ message to the wlmscpfs application (which is running on
"localhost" and listening on port "1234"). Option "--call OFFIS" specifies
that the called AE title is "OFFIS" which in turn tells the wlmscpfs
application to query the storage area "OFFIS" in its worklist database.

The two programs should then dump information that shows their internal
processings (C-FIND RQ - C-FIND RSP). You can also use a different query
file in folder "examples/wlistqry" for querying the worklist database.

As the wlmscpfs is not a hospital information system, worklist entries 
must be created, updated and deleted manually. The Debian dcmtk-www
package contains a cgi-based WWW server application which provides an easy 
to use web interface for managing worklist entries from  any workstation 
in the network.  More information about the DCMTK worklist web interface can
be found in 

    /usr/share/doc/dcmtk-www/wwwapp.txt


For more information please visit the DCMTK homepage and the user forum at

    http://dicom.offis.de/dcmtk.php.en

and

   http://forum.dcmtk.org/

 -- Mathieu Malaterre <malat@debian.org>  Fri, 21 Mar 2025 12:42:50 +0100
