raidionics / Raidionics

Software for automatic segmentation and generation of standardized clinical reports of brain tumors from MRI volumes
https://raidionics.github.io/
BSD 2-Clause "Simplified" License
31 stars 4 forks source link

Feature: Swapping opencv with skimage in rt_utils #56

Closed dbouget closed 10 months ago

dbouget commented 11 months ago

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

dbouget commented 11 months ago

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

andreped commented 11 months ago

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.

andreped commented 11 months ago

Might be that the current scikit-image implementation fails to capture holes: https://github.com/qurit/rt-utils/pull/53

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

andreped commented 10 months ago

Resolved in 6f1f2bb66fdccc40f739db733608d73b38a3b725.