Wednesday, October 2, 2019

Running a PixelMed DICOM Server

PixelMed has a reference Java implementation of the DICOM specifications. It is quite easy to set up and run PixelMed. This blog post summarizes the steps to get it run quickly.

First, download the source, binary, and dependencies of PixelMed DICOM server. At the time of writing, the latest version can be found here.

$ mkdir pixelmed-src

$ cd pixelmed-src

$ wget

$ tar -xvf pixelmedjavadicom_sourcerelease.20190626.tar.bz2

Extract the binary.

$ mkdir ../pixelmed

$ cd ../pixelmed

$ wget

$ tar -xvf pixelmedjavadicom_binaryrelease.20190626.tar.bz2

Extract the source and copy from com.pixelmed.server package to the root folder of the binary. The package also has the core class of the DICOM Server.

Adopt the for your needs.

# Where to store the database support files

# Where to store the images stored in the database

# Name to use for external TCP access to database (such a server will not be started if this property is absent)

# The root URL for the WebServer - if missing will default to the fully qualified local host name (which may not always be available, or appropriate for NAT'd external connections from outside the firewall)

# The name of the stylesheet for the WebServer

# The name of the request type to use for displaying instances for the WebServer

# WebServer.ListeningPort should be set to whatever port the web server listens
# on for incoming connections.

# WebServer.NumberOfWorkers should be set to a sufficient number to manage simulataneous incoming connections

# Dicom.StorageSCUCompressionLevel determines what types of compressed Transfer Syntaxes are
# proposed:
#    0 = none
#    1 = propose deflate
#    2 = propose deflate and bzip2 (if bzip2 codec is available)

# Dicom.ListeningPort should be set to whatever port this DicomImageViewer application is to
# listen on to accept incoming associations.

# Dicom.CalledAETitle should be set to whatever this DicomImageViewer application is to
# call itself when accepting an association.

# Dicom.CallingAETitle should be set to whatever this DicomImageViewer application is to
# call itself when initiating an association.

# Dicom.PrimaryDeviceType should be set to the type of device, e.g., WSD, ARCHIVE.

# Dicom.RemoteAEs is a space or comma separated list of all the available remote AEs;
# each AE may be named anything unique (in this file) without a space or comma; the name
# does not need to be the same as the actual AE title.
#Dicom.RemoteAEs=osirix helgray
# Each remote AE (listed in Dicom.RemoteAEs) needs to be described by three
# properties:
# Dicom.RemoteAEs.XXXXX.CalledAETitle
# Dicom.RemoteAEs.XXXXX.HostNameOrIPAddress
# Dicom.RemoteAEs.XXXXX.Port
# where XXXXX is the name of the AE displayed to the user and used in this file

Extract the dependencies and copy the lib folder to the root folder of the binary.

$ mkdir ../pixelmed-dep

$ cd ../pixelmed-dep

$ wget

$ tar -xvf pixelmedjavadicom_dependencyrelease.20190626.tar.bz2

$ cp -r lib/ ../pixelmed

$ cd ../pixelmed

$ java -server -Djava.awt.headless=true -Xms128m -Xmx512m -cp ./pixelmed.jar:./lib/additional/hsqldb.jar:./lib/additional/commons-compress-1.12.jar:./lib/additional/vecmath1.2-1.14.jar:./lib/additional/commons-codec-1.3.jar:./lib/additional/jmdns.jar:./lib/additional/aiviewer.jar com.pixelmed.server.DicomAndWebStorageServer

[main] INFO com.pixelmed.server.DicomAndWebStorageServer properties=
{Dicom.PrimaryDeviceType=ARCHIVE, Application.SavedImagesFolderName=tmp, Dicom.CallingAETitle=STORESCP, Dicom.CalledAETitle=STORESCP, Dicom.ListeningPort=11112}

Now, you may see the web view of the PixelMed DICOM viewer from from your browser.

No comments:

Post a Comment

You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.