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 http://www.dclunie.com/pixelmed/software/20190626_current/pixelmedjavadicom_sourcerelease.20190626.tar.bz2

$ tar -xvf pixelmedjavadicom_sourcerelease.20190626.tar.bz2


Extract the binary.

$ mkdir ../pixelmed

$ cd ../pixelmed

$ wget http://www.dclunie.com/pixelmed/software/20190626_current/pixelmedjavadicom_binaryrelease.20190626.tar.bz2

$ tar -xvf pixelmedjavadicom_binaryrelease.20190626.tar.bz2

Extract the source and copy testserver.properties 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 testserver.properties for your needs.

# Where to store the database support files
Application.DatabaseFileName=/tmp/testserverdb

# Where to store the images stored in the database
Application.SavedImagesFolderName=/tmp/testserverimages

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

# 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)
WebServer.RootURL=http://192.168.14.45:7091/


# The name of the stylesheet for the WebServer
WebServer.StylesheetPath=stylesheet.css


# The name of the request type to use for displaying instances for the WebServer
# One of INSTANCELIST, IMAGEDISPLAY, or APPLETDISPLAY
WebServer.RequestTypeToUseForInstances=INSTANCELIST


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


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


# 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.StorageSCUCompressionLevel=0


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

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


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

# Dicom.PrimaryDeviceType should be set to the type of device, e.g., WSD, ARCHIVE.
Dicom.PrimaryDeviceType=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 http://www.dclunie.com/pixelmed/software/20190626_current/pixelmedjavadicom_dependencyrelease.20190626.tar.bz2

$ 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 testserver.properties

[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 http://192.168.14.45:7091 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.