I have some trouble manually inserting traces on my plotted source space estimate.
First, when I plot my source space estimate, I get the following error in my console:
QWindowsWindow::setGeometry: Unable to set geometry 1131x1216+640+276 (frame: 1149x1261+631+240) on QWidgetWindow/"MainWindowClassWindow" on "\\.\DISPLAY1". Resulting geometry: 1131x1057+640+276 (frame: 1149x1102+631+240) margins: 9, 36, 9, 9 minimum size: 394x210 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=412,255 maxtrack=0,0) QWindowsWindow::setGeometry: Unable to set geometry 1131x1216+640+276 (frame: 1149x1261+631+240) on QWidgetWindow/"MainWindowClassWindow" on "\\.\DISPLAY1". Resulting geometry: 1131x1057+640+276 (frame: 1149x1102+631+240) margins: 9, 36, 9, 9 minimum size: 394x210 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=412,255 maxtrack=0,0)
and when I click on my plotted source space estimate to set my traces manually, I get this error:
File "C:\Users\Aqil\anaconda3\envs\mne\lib\site-packages\mne\viz\_brain\_brain.py", line 1348, in _on_button_release
self.picked_renderer = self.plotter.iren.FindPokedRenderer(x, y)
AttributeError: 'RenderWindowInteractor' object has no attribute 'FindPokedRenderer'
I also cannot erase the automatically generated traces on my plotted source space estimate no matter how many times I click on the plot. I can only clear them by pressing ‘c’. I had no trouble placing traces on my stc plots in older versions of MNE.
Of course! The code that I used for the sample is the same one that is available in this link by MNE Python.
Having been contacted by @larsoner, I was told that a revision in the _brain.py script here for _on_button_release function would resolve the issue among other suggestions, and it actually did resolve the issue and allowed me to place tracing on the plotted source space estimate! You can find the code below suggested by @larsoner:
def _on_button_release(self, vtk_picker, event):
if self._mouse_no_mvt > 0:
x, y = vtk_picker.GetEventPosition()
# programmatically detect the picked renderer
try:
# pyvista<0.30.0
self.picked_renderer = \
self.plotter.iren.FindPokedRenderer(x, y)
except AttributeError:
# pyvista>=0.30.0
self.picked_renderer = \
self.plotter.iren.interactor.FindPokedRenderer(x, y)
# trigger the pick
self.plotter.picker.Pick(x, y, 0, self.picked_renderer)
self._mouse_no_mvt = 0
I still do get the following error on my Spyder console, but I am happy with being able to place tracing on my plotted source space estimate. Here is the error that has not gone away:
Using control points [1.74975597 1.92527842 3.13917643]
C:\Users\Aqil\anaconda3\envs\mne\lib\site-packages\pyvista\core\dataset.py:1192: PyvistaDeprecationWarning: Use of `point_arrays` is deprecated. Use `point_data` instead.
warnings.warn(
C:\Users\Aqil\anaconda3\envs\mne\lib\site-packages\pyvista\core\dataset.py:1192: PyvistaDeprecationWarning: Use of `point_arrays` is deprecated. Use `point_data` instead.
warnings.warn(
QWindowsWindow::setGeometry: Unable to set geometry 1131x1216+640+276 (frame: 1149x1261+631+240) on QWidgetWindow/"MainWindowClassWindow" on "\\.\DISPLAY1". Resulting geometry: 1131x1057+640+276 (frame: 1149x1102+631+240) margins: 9, 36, 9, 9 minimum size: 394x210 MINMAXINFO maxSize=0,0 maxpos=0,0 mintrack=412,255 maxtrack=0,0)
C:\Users\Aqil\anaconda3\envs\mne\lib\site-packages\pyvista\core\dataset.py:1192: PyvistaDeprecationWarning: Use of `point_arrays` is deprecated. Use `point_data` instead.
warnings.warn(
The error keeps reappearing every time I click on the source space plot.