raidionics / Raidionics

Software for automatic segmentation and generation of standardized clinical reports of brain tumors from MRI volumes

Home Page:https://raidionics.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Swapping opencv with skimage in rt_utils

dbouget opened this issue · comments

Bundling opencv-python is challenging, should just fork rt_utils and try to swap the find_contours method from opencv to scikit-image.

Conflict between Qt from opencv (even though using the headless package) and PySide6 v6.5.2, making the executable not launch in Ubuntu with the following error:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/dbouget/Documents/Code/Private/Raidionics/dist/Raidionics/PySide6/plugins/platforms" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

See => https://stackoverflow.com/a/67863156

I made an attempt at replacing opencv-python with scikit-image in the rt-utils package. Mechanically it runs but tests are not passing. It will likely be easier to debug this yourself with the raw data (which I do not have) and comparing it against the old implementaton output. Essentially, the final segmentation volumes are not identical - likely because the approximation do not yield the same result.

Anyways, you can use my branch for testing:
https://github.com/andreped/rt-utils/tree/scikit-image

Make a PR to my branch if you manage to fix it, then we could start replacing it with opencv-python-headless, if deemed suitable.

Might be that the current scikit-image implementation fails to capture holes: qurit/rt-utils#53

Let me know how the final segmentation volumes look in 3D Slicer.

Resolved in 6f1f2bb.