Skip to content

Installation Instructions

Ashley edited this page Apr 6, 2023 · 14 revisions
Table of contents

Ubuntu
Windows
Plastimatch

Ubuntu

Note: OnkoDICOM should work on other Linux distributions, however it has not been tested on them. If you identify any issues preventing OnkoDICOM from running on other Linux distributions, please make a ticket.

Onko can be installed on Ubuntu 20.04, if you do not run Ubuntu you can try it on a virtual machine such as Virtualbox A premade Ubuntu virtual machine can be downloaded from OSBoxes.

Ubuntu 22.04 is not supported.

Onko requires virtualenv, python3-dev, gcc, Libopengl0, plastimatch and git installed and can be installed by running this command in the terminal.

sudo apt update

sudo apt-get install plastimatch

OnkoDICOM uses python3.10. Ubuntu 20.04 does not support python 3.10 natively. pyenv will provide python 3.10

To install python 3.10

sudo apt-get install git gcc libopengl0

sudo apt-get install make build-essential libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

curl https://pyenv.run | bash

add the following entry to the ~/.bashrc file

# pyenv export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)"

source .bashrc

test pyenve is installed pyenv --version

find the latest python 3.10 version

pyenv install --list | grep -i 3.10

install

pyenv install 3.10.x

pyenv global 3.10.x

test python3 --version

references: https://github.com/pyenv/pyenv and https://brain2life.hashnode.dev/how-to-install-pyenv-python-version-manager-on-ubuntu-2004

OnkoDICOM uses poetry; please follow the poetry installation instructions here: https://python-poetry.org/docs/

Clone the Onko repository

git clone https://github.com/didymo/OnkoDICOM.git

Enter the directory and create a virtual environment with a name of your choice, in this case it's .venv.

cd OnkoDICOM
`poetry config virtualenvs.in-project true`
`poetry install`
`poetry shell`

Note that when cloning into a PyCharm workspace, it is recommended to create a virtual environment from the terminal outside of PyCharm, as PyCharm's built-in virtual environment creation often leads to issues with the pip version.

You can execute Onko by running

python main.py

Windows

In order to run OnkoDICOM on Windows, you will need to have installed:

  • 64-bit Python 3.9. OnkoDICOM will not run on 64-bit computers that have a 32-bit version of Python installed. Additionally, OnkoDICOM has not been tested on 32-bit machines.
  • Visual Studio Build Tools

OnkoDICOM uses poetry; please follow the poetry installation instructions here: https://python-poetry.org/docs/

git clone https://github.com/didymo/OnkoDICOM.git cd OnkoDICOM

:: Set up virtual environment

poetry env use "C:\Users\User\AppData\Local\Programs\Python\Python309\python.exe"

poetry config virtualenvs.in-project true

poetry install

poetry shell

pip install opencv-python

pip install pyradiomics

After the requirements are installed, you can run OnkoDICOM with the command:

python main.py

OnkoDICOM will always need to be run within the virtual environment, so make sure it is activated before attempting to run Onko.

Plastimatch

To utilise OnkoDICOM's radiomics toolset, the external program Plastimatch is required.

On Linux systems that use the APT package manager, the following command can be used:

sudo apt-get install plastimatch

For Windows, the binaries can be downloaded from Plastimatch's SourceForge.

Note that in order to be able to use Plastimatch in OnkoDICOM on Windows, Plastimatch's binaries must be added to the system's PATH. Plastimatch's installation wizard will give you the option to add Plastimatch to the system PATH for the current or all users. Alternatively, the binaries can be manually added to the system PATH.