Wiki

Clone wiki

Radiomics Enabler / Upgrade_Instructions_V1-3toV1-4

#Upgrade Instructions for Radiomics Enabler® from version 1.3.x to version 1.4.x #

##About Radiomics Enabler® ##

Radiomics Enabler® is a software that allows for interactive search and recuperation of medical images stored in Picture Archive and Communications Systems (PACS). It is deployed as a web server that manages the PACS queries and data retrievals.

Radiomics Enabler® is a registered trademark. General information, video and installation package can be found at www.medexprim.com/radiomics-enabler.

The software is made freely available to the imaging community under AGPLv3.

Copyright (c) 2017-2018 - Medexprim

Overview

Upgrading from a 1.3.x version to a 1.4.x version is slightly more complicated because of the major version change of Python from 2.7 to 3.5. The following instructions include a section dedicated to the update of the python environment

Stop the system

The first step is to shut down all of the services:

sudo service apache2 stop
sudo service celeryd stop
sudo service storescp stop

Update the Radiomics Enabler installation

Backup directories:

cd /opt/RadEnab
cp -R site site.bak
cp -R extras extras.bak
cp -R static static.bak

Keep track of any symbolic link you may have (like /opt/RadEnab/data to /data) as untarring the package may break them.

Untar the package:

cd /opt
tar xvzf RadiomicsEnabler_vX.X.X.tar.gz

Update the Python installation to Python 3

Backup the existing virtual environment directory by moving it to a different directory name

cd /opt/Venv
mv RadEnabVenv RadEnabVenv.bak

and create the Radiomics Enabler virtual environment using Python 3:

python3 -m venv RadEnabVenv

Next activate the virtual environment using the command

. /opt/Venv/RadEnabVenv/bin/activate
cd /opt/Venv/RadEnabVenv

Next, we install the different python packages and their supports that we need. The fast way to do this is with the requirements.txt file that is in the same directory as the manage.py file. The command to execute is

pip3 install -r /opt/RadEnab/site/requirements.txt

If there is an error (or you like typing) you can do the same thing manually as:

pip3 install django==2.1  
pip3 install celery
pip3 install django_tables2
pip3 install django-extensions
pip3 install django-cors-headers
pip3 install pydicom

Note: if you use a proxy, add the --proxy http://"username:password"@proxy_address:proxy_port option in the above commands.

We need to install the interface to Postgres which requires some development components:

sudo apt-get install libpq-dev
sudo apt-get install python3-dev

and

pip3 install psycopg2
pip3 install psycopg2-binary

Finally we need to install the WSGI module (used to interface with the Apache Web server) as well

sudo apt-get  install apache2-dev 
pip3 install mod_wsgi

Migrate the database using Python3

Migrate the database and static files:

cd /opt/RadEnab/site
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py collectstatic
deactivate

Check the symbolic links and reset them if needed.

Update the Apache Installation

The Apache server serves content from python based sites using mod_wsgi. This software in the web server needs to be updated using the following command:

sudo apt-get install libapache2-mod-wsgi-py3

This installation will normally uninstall the mod-wsgi module for Python 2.

Normally, when the mod-wsgi is installed, it is enabled, but if not, you can use the following command to enable it:

sudo a2enmod wsgi

Running the Radiomics Enabler Application

To start the application, restart the apache2 web server, and re-enable the site

sudo service apache2 start
sudo a2ensite radiomics-enabler

Testing & Troubleshooting

Try http://localhost:8000/admin and login as the administrative user. If you can do this, this means that Django is correctly installed in the Apache web server. You can create test users at this point.

Next, try http://localhost:8000/RadiomicsEnabler/login and login as the administrative user. Try to create a test project and a test batch to verify that all is installed correctly.

Restart the rest of the system

Start services

sudo service celeryd start
sudo service storescp start

Updated