-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
visual artifacts when using threshold in add_data #303
Comments
These blending issues are tricky to fix. You could try the PyVista-based backend to mne.viz.Brain instead, here alpha blending is done in the CPU so a single surface is used. It shoouldn't have these problems |
Thanks so much for the quick reply!! I did end up doing it that way, with the mne pyvista backend, but I was having trouble customizing certain things like the locations of colorbars (see image below). I also really liked the customizability of controlling color values like here. But, I can probably do that with pyvista too, right? I guess I got used to some of the pysurfer and mayavi functionality. This is the code for visualizing the same things through mne (if it is helpful for any future researchers):
visualization (with colorbar placement issue): Do you know of any easy ways (or code examples you have encountered) to redo some of the classic example gallery pysurfer visualizations like the RGB color and plotting activation foci from MNI coordinates? For example, I would have expected the pysurfer wrapper for But when I use:
instead of getting the marker on angular gyrus I get this (it looks like it might be close on one axis, but incorrectly scaled in another): I understand if you can't answer these questions. I might go to the mne support, but I might as well check with you too! Thanks again for your quick response! |
add_foci in millimeters (rather than using a vertex number) on the inflated surface is strange. It will probably match / be correct if you use pial for example, or if you switch to a vertex number But yes please use https://mne.discourse.group for these usage questions. These do seem like usecases we want to support over in MNE |
Thanks again! I've moved over this discussion to a new thread at mne.discourse.group. |
I am getting some artifacts when I try to use the threshold argument when visualizing a numpy array in pysurfer.
I was unable to install pysurfer on a Mac running MacOS Sierra 10.12.6 with an issue surrounding vtk. I was able to run pysurfer when I used the environment file in the latest MNE github repo: https://github.com/mne-tools/mne-python (see bottom for environment.yml contents).
I created the conda env below which used Python 3.9.6 with the following line:
conda env create -f environment.yml
I then opened a jupyter notebook and ran the following two lines under an fsaverage6 brain:
The first line (left hemisphere) does not use the threshold argument while the second line (right hemisphere) does use the threshold argument. L and R are numpy arrays of length 40962 (since I'm using fsaverage6). As you can see from the picture below, I get some interesting artifacts that I can't seem to remove. I've tried specifying the vertices to render (as you can see from code above), I've also tried turning the nan vertices into 0s to see if it's just an issue with nans, but it is not. The left side of the image below doesn't have the artifacts, but it renders the nans as default red color which I wanted to remove by using threshold. While using threshold does remove the red default color, I get weird aliasing looking artifacts.
And a close-up:
Any help would be appreciated! Thank you so much!
environment.yml file below
The text was updated successfully, but these errors were encountered: