RPB integrates with script-able research PACS system - Conquest (1.4.19b) to store all documented medical imaging and treatment planning data in DICOM format. Optionally the Clinical Trial Processor - CTP software is used for flexible configuration of DICOM processing pipelines in particular research projects.

OS Init Application Server Database
Debian 11 (Bullseye) System V/ systemd Apache PostgreSQL 13


  • Port: 5432
  • Locale: UTF8
  • Root user: postgres
Listing 5 Create conquest role and database
psql -U postgres -c "CREATE DATABASE conquest WITH ENCODING='UTF8' OWNER=conquest"


Web server will provide Common Gateway Interface (CGI) to Conquest. This can be used as simple DICOM server web interface.

Listing 6 Install apache2 web server
apt-get install apache2
a2enmod cgi
/etc/init.d/apache2 restart


Download Conquest sources (conquest-14-19b) from official web site.


Listing 7 Create DICOM Server folder
mkdir /opt/conquest-14-19b
cd /opt/conquest-14-19b
Listing 8 Create a user and group which will run Conquest as a service
groupadd conquest
useradd -g conquest -d /opt/conquest-14-19b conquest
useradd conquest-import
passwd conquest
vi /etc/passwd change /bin/sh conquest user to /bin/false
chown -R conquest:conquest /opt/conquest-14-19b
chown -R conquest-import:conquest /opt/conquest-14-19b/data/incoming
chmod g+w /opt/conquest-14-19b/data/incomming
Listing 9 Compile and install jpeg libary that is necessary to build Conquest
apt-get install build-essential
cd jpeg-6c
make install
Listing 10 Compile and install jasper libary that is necessary to build Conquest
cd ../jasper-1.900.1-6ct
make install
Listing 11 Create customised makefile
vi mymak

export LD_LIBRARY_PATH="/usr/local/pgsql/lib/"
gcc -o lua.o -c lua_5.1.4/all.c -Ilua_5.1.4
g++ -I/usr/include/postgresql -DUNIX -DNATIVE_ENDIAN=1 -DHAVE_LIBJASPER -DHAVE_LIBJPEG -DPOSTGRES -Wno-write-strings total.cpp lua.o -o dgate -lpthread -L/usr/lib -lpq -L/user/local/lib -ljasper -ljpeg -Ijpeg-6c -Ljpeg-6c -Ilua_5.1.4 -Wno-multichar
rm lua.o
pkill -9 dgate
sleep 0.2s

# Replace DICOM server dicom.ini with default config - comment when update or rebuild
cp dicom.ini.postgres dicom.ini
# Replace DICOM server dicom.sql with default config - comment when update or rebuild
cp dicom.sql.postgres dicom.sql

# Copy executable to allow CGI
cp dgate /usr/lib/cgi-bin
# Replace the CGI dicom.ini - comment when update or rebuild
cp dicom.ini.www /usr/lib/cgi-bin/dicom.ini
Listing 12 Give mymak executable flag
chmod +x mymak


Listing 13 Build and install Conquest


DICOM server configuraton (/opt/conquest-14-19b/dicom.ini)

Listing 14 DICOM server application entity (AE) title
MyACRNema = RPBPacs1
TCPPort = 5678

PACSName = RPBPacs1
Listing 15 Change PostgreSQL settings
SQLHost = localhost
SQLServer = conquest
Username = conquest
Password = conquest
Listing 16 Change the default MAG - file storage of DICOM data
MAGDevice0 = /mnt/data1/

CGI DICOM server configuration (/usr/lib/cgi-bin/dicom.ini)

Listing 17 Change CGI DICOM server settings
MyACRNema = RPBPacs1
TCPPort = 5678

ACRNemaMap = /opt/conquest-14-19b/acrnema.map
kFactorFile = /opt/conquest-14-19b/dicom.sql
SOPClassList = /opt/conquest-14-19b/dgatesop.lst
Dictionary = /opt/conquest-14-19b/dgate.dic

WebScriptAddress = http://<server_address>/cgi-bin/dgate

Start Conquest DICOM Server

Listing 18 Initialise or regenerate database
/opt/conquest-14-19b/dgate -v -r
Listing 19 Start DICOM server
/opt/conquest-14-19b/dgate -v &

Downloading DICOM studies/series

In order to be able to download zipped version of DICOM studies or series it is necessary to install zipping program. Conquest ist using 7zip.

Listing 20 Install 7zip
apt-get install p7zip-full
Listing 21 Get rid of error messages spamming the Conquest logs (create empty file)
vi /opt/conquest-14-19b/zip.cq

Clinical Trial Processor (CTP)

Default installation.