Skip to content

dicom_listener

Nicolas Rannou edited this page Mar 2, 2017 · 20 revisions

Dicom listener

Orthanc server

See details on the offical website: http://www.orthanc-server.com/.

- Make sure to add a new entry in the "DicomModalities"
- in the configuration file before starting the server. See below.

The following entry tells Orthanc to accept connection from "calling aet" (aec) CHIPS, and if "CHIPS" requires data to be moved (px-move), the data will be pushed to localhost:10402.

"chips" : [ "CHIPS", "localhost", 10402 ]

px-listener setup

ubuntu

1- Install pypx

2- Install xinetd

apt-get install -y xinetd

3- Make sure directories used to store data exist

mkdir -p /tmp
mkdir -p /incoming/log
mkdir -p /incoming/data

4- Configure xinetd You might have to change root user to your actual username, i.e. chips. This user must have permission to write in the directories used to store data (/tmp, /incoming/log, /incoming/data)

echo "service dicomlistener
{
   disable             = no
   socket_type         = stream
   wait                = no
   user                = root
   server              = /usr/local/bin/px-listen
   server_args         = -e /usr/bin/storescp -t /tmp -l /incoming/log -d /incoming/data
   type                = UNLISTED
   port                = 10402
   bind                = 0.0.0.0
}" > /etc/xinetd.d/dicomlistener

5- Restart xinetd service

service xinetd restart

6- Test listener

# install network utils
apt-get install -y netcat

# connect to listening port
# this command must hang.
# if it returns, something is wrong
# if so, run "/usr/local/bin/px-listen -e /usr/bin/storescp -t /tmp -l /incoming/log -d /incoming/data" for more information
nc localhost 10402

Hit "ctl + c" to stop "nc localhost 10402".

A file should have been created in /incoming/log/.

mac

1- Install pypx

2- Add a new service: In /etc/services add the lines:

dicom-listener    10402/tcp   # dicom listener
dicom-listener    10402/udp   # dicom listener
#                             Nicolas Rannou <[email protected]>

test it!

Clone this wiki locally