[Mne_analysis] BEM mesh error while downsampling vertices

Kadwani, Manorama MKADWANI at mgh.harvard.edu
Fri Oct 9 21:48:16 EDT 2020
Search archives:

Hi,

I was able to locate the vertices using the "rr" matrix. I dissolved those error-giving vertices in Blender.

But while running the "make_bem_model" function, I got a runtime error message that:
"Surface inner skull is not complete (sum of solid angles yielded 0.999622, should be 1.)"

What's missing in the surface to not have the solid angle as 1?

Thanks,
Manorama
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Kadwani, Manorama <MKADWANI at mgh.harvard.edu>
Sent: Tuesday, October 6, 2020 5:24 PM
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu>
Subject: Re: [Mne_analysis] BEM mesh error while downsampling vertices

Ok, thanks!

Manorama
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Eric Larson <larson.eric.d at gmail.com>
Sent: Tuesday, October 6, 2020 5:19 PM
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu>
Subject: Re: [Mne_analysis] BEM mesh error while downsampling vertices


        External Email - Use Caution

>From the code I pasted above, you should in principle be able to get the X/Y/Z coordinates of any vertex you need. They are stored in the rows of "rr". From that vertex number and the X/Y/Z coordinates, Blender probably provides a way to select (or remove) points, and probably also fix topological defects. But I don't really use Blender so I'm not sure.

Eric


On Tue, Oct 6, 2020 at 3:39 PM Kadwani, Manorama <MKADWANI at mgh.harvard.edu<mailto:MKADWANI at mgh.harvard.edu>> wrote:
Thanks for the instructions.

Do you know which one is the vertex with less than 3 neighboring triangles?

Manorama
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu> <mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu>> on behalf of Eric Larson <larson.eric.d at gmail.com<mailto:larson.eric.d at gmail.com>>
Sent: Tuesday, October 6, 2020 2:29 PM
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu<mailto:mne_analysis at nmr.mgh.harvard.edu>>
Subject: Re: [Mne_analysis] BEM mesh error while downsampling vertices


        External Email - Use Caution

Repo: https://github.com/mne-tools/mne-python
Contributing instructions: https://mne.tools/dev/install/contributing.html#contributing
FAQ file: https://github.com/mne-tools/mne-python/blob/master/doc/overview/faq.rst#my-watershed-bem-meshes-look-incorrect

Eric


On Tue, Oct 6, 2020 at 2:18 PM Kadwani, Manorama <MKADWANI at mgh.harvard.edu<mailto:MKADWANI at mgh.harvard.edu>> wrote:
Can you share the repo link where I can make a PR?
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu> <mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu>> on behalf of Kadwani, Manorama <MKADWANI at mgh.harvard.edu<mailto:MKADWANI at mgh.harvard.edu>>
Sent: Tuesday, October 6, 2020 12:39 PM
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu<mailto:mne_analysis at nmr.mgh.harvard.edu>>
Subject: Re: [Mne_analysis] BEM mesh error while downsampling vertices

Hi Eric,

I forgot to turn off the digest mode, so I can't reply to your email directly.

Thanks for the code.
I could only see a subset of those vertices. Also, couldn't see how to edit those vertices, so I used Blender for editing.
Using the vertices shown in the PyVista plot, I tried to zoom in at the location of those vertices in Blender. But I couldn't find the exact vertex which has fewer than 3 neighbouring triangles.

I found many free-floating vertices, so deleted those. Then the number of vertices in the surface reduced a lot. I have shown an image of those vertices.

Also attached is an image of the area where the Pyvista plot showed a vertex marked in red. All of the vertices have atleast 3 neighbour triangles.

Sure, I can put a Github pull request.

Thanks,
Manorama

________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu> <mne_analysis-bounces at nmr.mgh.harvard.edu<mailto:mne_analysis-bounces at nmr.mgh.harvard.edu>> on behalf of Kadwani, Manorama <MKADWANI at mgh.harvard.edu<mailto:MKADWANI at mgh.harvard.edu>>
Sent: Wednesday, September 30, 2020 6:16 PM
To: Discussion and support forum for the users of MNE Software <mne_analysis at nmr.mgh.harvard.edu<mailto:mne_analysis at nmr.mgh.harvard.edu>>
Subject: [Mne_analysis] BEM mesh error while downsampling vertices

Hi,

I got a runtime error while making a BEM model (using mne.make_bem_model) that :
"Surface inner skull has topological defects: 12 / 20484 vertices have fewer than three neighboring triangles [733, 1014, 2068, 7732, 8435, 8489, 10181, 11120, 11121, 11122, 11304, 11788]"

As mentioned in this link- https://github.com/mne-tools/mne-python/issues/6127 I tried to visualize the inner skull surface but didn't know how to find those vertices. I have attached an image of the inner skull surface. I could see some small triangles at places I wouldn't expect them. So I tried to smoothen out any irregularities in Freeview using the smoothing tool. That didn't help. I still got the runtime error but with different vertices:
"RuntimeError: Surface inner skull has topological defects: 12 / 20479 vertices have fewer than three neighboring triangles [733, 1014, 2068, 7730, 8433, 8487, 10179, 11118, 11119, 11120, 11302, 11786]"

Any idea on how to view and edit these vertices?

Thanks,
Manorama
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu<mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201010/0aa92be2/attachment-0001.html 


More information about the Mne_analysis mailing list