Dear all,
We have been using SCT for a while now, and due to our structure of folders(and because I feel more comfortable around it), we used to run the SCT from MATLAB.
We have had no problem whatsoever with this since now. We wanted to call sct_label_utils -i T1.nii -create-viewer 3 -o c3label.nii.gz
but this line uses GUI and, when it’s called, gives us the following error
Spinal Cord Toolbox (4.3)
/home/extop/sct_4.3/spinalcordtoolbox/gui/widgets.py:12: MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
I didn’t have the last version and i expected(hoped) it to be an “old_Version” problem but after successfully downloading and installing the latest version, the problem persists.
After playing a little with the code, we managed to overcome the first troubles. In the widgets.py
file, lines 12 and 13, we changed
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
to
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar
because my limited knowledge does not understand the point of importing it from qt4agg
or directly from qt5agg
.
Nevertheless, the output from the order is now
Spinal Cord Toolbox (4.3)
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
After not succeeding, I deleted all the changes done in the SCT scripts and brought them back to their original forms.
Probably this is a MATLAB problem. And I definitely need a bash/shell class
peace,
Aran