didymo / OnkoDICOM

OnkoDICOM was created with Radiation Oncologists to allow Radiation Oncologists to do research on DICOM standard image sets (DICOM-RT, CT, MRI, PET) using open source technologies, such as pydicom, dicompyler-core, PySide6, PIL, and matplotlib. OnkoDICOM is cross platform, open source software, and welcomes contributions. OnkoDICOM was inspired by dicompyler.
https://onkodicom.com.au
GNU Lesser General Public License v2.1
62 stars 42 forks source link

run OnkoDICOM #248

Closed thanhtaiphys closed 1 year ago

thanhtaiphys commented 2 years ago

Hi

I followed the installation instruction at https://github.com/didymo/OnkoDICOM/wiki/Installation-Instructions and don't have any error for each step but the final step (python main.py) I can not run OnkoDICOM

image

sjswerdloff commented 2 years ago

It's not clear which operating system you are using, but it looks like you need to install qt6 (which itself is not python or a python package) if you are using Ubuntu 22.04:

sudo add-apt-repository universe sudo apt update sudo apt install qt6-base-dev

if you are using an older version of Ubuntu you might need: sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" sudo apt update sudo apt install qt6-base-dev

didymo commented 2 years ago

Sorry, OnkoDICOM now uses poetry to manage dependences. THe Unbuntu instructions have been updated. The other instructions will be updated in due course. If you use Windows there is an executable available.

thanhtaiphys commented 2 years ago

I am running on Ubuntu 20.04

sudo add-apt-repository universe ==> done sudo apt update ==> done sudo apt install qt6-base-dev==> done

python main.py==> can not run

image

sjswerdloff commented 2 years ago

@thanhtaiphys , you can try installing locate sudo apt install plocate and then try to locate the library: locate libQt6Core.so.6 and then (with whatever the actual path is) ldd /path/to/libQt6Core.so.6 to see if there are any missing libraries that it calls on. There may be some dependencies that are not being fulfilled.

I'll try to replicate on an Ubuntu 20.04 VM on Intel/AMD platform, but I probably can't get to that until this weekend.

sjswerdloff commented 2 years ago

I'm having some difficulty getting OnkoDICOM to run on macOS Monterey (12.5.1) on Apple Silicon (Arm64). I had to (re?) install a number of packages:

pip install pyside6 
pip install dicompyler-core
pip install alphashape
pip install platipy
pip install imblearn
pip install kaplanmeier
pip install fuzzywuzzy
pip install pymedphys
pip install vtk
pip install python-Levenshtein

With that (actually, the python-Levenshtein isn't absolutely necessary, but there was a warning about performance without it), I got the welcome screen.

When I choose "Individual Patient Curation", it crashes. I'll open a separate issue. If I choose "Batch Processing" I get a follow-on dialog.

With a local fix to the initial crash on "individual patient curation", pymedphys is raising errors based on failed imports (more packages to install). That might be a problem with pymedphys.

thanhtaiphys commented 2 years ago

I followed your comment

image

sjswerdloff commented 2 years ago

please try ldd /usr/lib/x86_64-linux-gnu/libQt6Core.so.6 and ldd /home/td/OnkoDICOM/venv/lib/python3.8/site-packages/PySide6/Qt/lib/libQt6Core.so.6

didymo commented 2 years ago

Sorry I have been using the Windows System for weeks to get a build. The fact that the Linux install became painful at that time was overlooked. The current list of pip installs Stuart provided will be investigated. Sorry for the misleading reply.

sjswerdloff commented 2 years ago

@thanhtaiphys I managed to get OnkoDICOM 0.05.02-beta to start up on Ubuntu 20.04, but I had to do a fair amount of installation hacking that I don't think is reasonable to expect from users. Once I did get it running (first window), I had similar issues on Ubuntu 20.04 as I did on MacOS 12.5.1 Arm64 (Apple Silicon) having to do with forced recursive imports (of things that were deliberately intended to be imported only if needed). And ultimately, there are packages that aren't needed for OnkoDICOM that get imported by force that are not compatible with python 3.10 and later.

So I'm of the opinion that OnkoDICOM 0.05.02-beta is MS Windows Only, and probably should only be used from the pre-built binary. I'll work with the maintainer to fix the various things that are broken, and aim for something like a 0.05.03-beta version. This will probably take several weeks.

sjswerdloff commented 2 years ago

@thanhtaiphys : There are a few things to try, I think the fundamental issue for the error message you get is a missing dependency (something that libQt6.Core.so.6 is looking for and is not finding). Also, for Ubuntu, it seems one is much better off with Python 3.9 (all kinds of problems go away) one should start with a virtual environment that uses python 3.9, not python 3.10: (after installing pyenv) The following is an example, I just ran it (but if your version of 3.9 is not 3.9.15, then specify whatever it is that you do get)

  pyenv install 3.9
  pyenv virtualenv 3.9.15 onko_py39
  pyenv activate onko_py39

please try installing these supporting (non-python) packages using apt:

sudo apt update
sudo apt-get -y install build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5
sudo apt-get -y install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get -y install g++

And then try using the python interpreter and a single line to see that PySide6 is actually fully available. python >>> import PySide6

if this fails, you might want to try with a fresh Ubuntu (and maybe start with Ubuntu 22.04... but repeat these instruction suggestions in that OS. I got things to work on Ubuntu 22.04. first) On the other hand, if this succeeds, You need to get poetry to update (and overwrite) the previous set of dependencies that were built on Windows with Python 3.10 in the OnkoDICOM directory:

poetry update
poetry install

I had to repeat the pip installation of pyradiomics (it failed on poetry install not finding numpy for some reason) pip install pyradiomics

If you have crashes at that point, that aren't about PySide6, I can provide you with access to some "patches" (updated files), or I'll get some pull requests through the project (and you can pull them or re-clone). I've submitted issues regarding the problems I ran in to (so you might want to take a look at those should you have further issues).

Sorry for the "teething pains"

thanhtaiphys commented 2 years ago

Thank you so much

sjswerdloff commented 1 year ago

@thanhtaiphys have you gotten OnkoDICOM running yet? I followed the instructions that are on the wiki starting from a clean python 3.9 virtual environment on Ubuntu 20.04 (but with all of the apt packages already installed), and it worked for me. I'd like to close this issue, but I don't want to do that until you have OnkoDICOM running on your Ubuntu 20.04 environment

thanhtaiphys commented 1 year ago

Dear Sjswerdloff,

Thank you for your time to help me.

Yes, please close this issue

Thanks

sjswerdloff commented 1 year ago

Closed at 80b9e7b0d5fc925d392500588f03d508a8705532 Ubuntu 20.04, python 3.9, apt packages to include (@didymo please update installation instructions to ensure the following are available in 20.04 and are in the list): build-essential openssl libssl-dev libssl1.0 libgl1-mesa-dev libqt5x11extras5 libglu1-mesa-dev freeglut3-dev mesa-common-dev g++

sjswerdloff commented 1 year ago

@thanhtaiphys thank you for sticking with us while we work through some of the rough edges of the new milestone (0.5)