mne-python: BUG: Bugs with VTK 9
@GuillaumeFavelier you can now pretty easily build and install VTK 9 (which is good because they are on RC3, and it should fix some bugs and bring 3.8 support):
git clone --recursive https://gitlab.kitware.com/vtk/vtk.git
mkdir vtk-build
cd vtk-build
cmake -GNinja -DVTK_BUILD_TESTING=OFF -DVTK_WHEEL_BUILD=ON -DVTK_PYTHON_VERSION=3 -DVTK_WRAP_PYTHON=ON ../vtk
ninja -j 4
python setup.py bdist_wheel
pip install dist/vtk-*.whl
However, there is at least one rendering bug (depth peeling again maybe?) where the surface overlay gets cut off at some distance based on rotation (note the rightward “v” cut of the overlay):

We might need to figure out how to properly resolve the coincident topology here – relying on VTK to do it automagically might not work anymore. Or maybe it’s something else…?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 28 (27 by maintainers)
VTK9 rc3 wheels are up so you can try @GuillaumeFavelier :
https://vtk.org/download/
For me the
stc.pyexample we always runs just freezes, I think due in part to this:https://github.com/pyvista/pyvista/pull/686
It occurred to me that we actually need to fix this soon because once VTK9 wheels land on PyPi and are incorporated by Anaconda, anyone who installs or upgrades MNE will be stuck with unusable plotting 😦
Can you look into it?
FWIW, PyVista worked “out of the box” this way, while Mayavi fails to compile (which I’ll look into) 😃
@GuillaumeFavelier might be good to fix this before looking into
coregHooray! With
pip install --upgrade --user pyqt5which gives 5.14.2 everything works fine(FYI I forgot a
ninja -j 4in the command list above, I’ve updated it now)WARNING: Will download 1.5 GB of data to
~/mne_data(unless you give it a different path to use)You will probably need to
pip install nibabel https://github.com/mne-tools/mne-python/zipball/masterfirst.This is the code I was using (last I recall!), but for some reason now it hangs when I try it.