Hi All, I am having difficuly with displaying parcellations on the brain corticol surface. I am making screenshots of this using the screenshot() function for brains in a medial and lateral view.
The problem I am facing is that a parcellation shown on the medial side also shines through to the lateral side, due to transparancy of the surface. I would like to block any parcellations showing on the other side of the hemisphere.
I a using these lines of code:
brain = Brain(‘fsaverage’, hemi=‘lh’, surf=‘pial’,
subjects_dir=subjects_dir, size=(320, 300), cortex = ‘classic’, background=‘white’, alpha=1, views=[‘lateral’], offscreen = True)
for e,check_label in enumerate(check_labels):
brain.add_label(check_label, alpha = 0.6, color = cmap(grades[0][e]))
this is actually not due to the transparency of the cortex surface. It is a rendering bug that I’ve seen before (on laptops that had only integrated Intel graphics, not separate graphics cards). The first thing I would try is upgrading to MNE-Python 0.24 so that you can use the pyvista 3D backend instead of the mayavi 3D backend. I think (?) that might be enough to fix it, but if not, please report back here and provide some additional details about your system:
the graphics card: you can do this through Device Manager > Display > Graphics Card > properties (I think that’s the right sequence), or by running command prompt as administrator and running wmic path win32_VideoController get name.
Oh, yes, I got that bug on two computers about a year ago, and at that time I could not solve it by upgrading mne (and I couldn’t easily switch to PyVista as I had substantial amount of mayavi-specific code). Interestingly, the laptop had a dedicated graphics card apart from the intergrated intel one, but maybe it was not used by default in mne? In my case trying a different machine helped, so you may also try that @TijmenWartenberg
sklearn: 0.24.2
numba: Not found
nibabel: 3.2.0
cupy: Not found
pandas: 1.2.2
dipy: Not found
mayavi: 4.7.2
pyvista: Not found
vtk: 9.0.1
PyQt5: 5.12.3