Editing BEM meshes (Blender)

External Email - Use Caution

Dear all,

I had problems with BEM surfaces of FreeSurfer, thus I tried to correct them with the software Blender. After manual editing, according to plots, the intersections between the outer skull and outer skin disappear. However, when I run my Python script to create the 3-layer BEM model (conductivity = (0.3, 0.006, 0.3)), I have the same error message: ?FAILED to create 3-layer BEM for sub009: Surface outer skull is not completely inside surface outer skin.?

I am using the ds117 dataset.

Plots (subject 9):

* Original plot without edit:?https://correoipn-my.sharepoint.com/:i:/g/personal/jliconam1700_alumno_ipn_mx/Ee725N_sYlhHtVMvMVDq7UABDrd6yjCwE9unGYMVVj3UvQ?e=co8vb4

* Plot after Blender edit: https://correoipn-my.sharepoint.com/:i:/g/personal/jliconam1700_alumno_ipn_mx/EQjGk_LZgyNItO-sJ8dYLZgB9a6W1HfqzqtiIEZYy6dlQA?e=KAlbM4

Any advice?

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Best,
Ricardo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201024/658f061e/attachment.html

External Email - Use Caution

The first image did not come through. But in the second (corrected) one, in
the lower left plot you can see the outer skull (yellow) surface come very
close to the outer skin (peach) surface. `plot_bem` by default only shows
some slices -- if you use mne Report to render the bem with `decim=1`
you'll get an interactive slider where you can see all slices. There are
probably some slices for which they do intersect. You can also plot them in
3D using `plot_alignment` with the `surfaces` argument, or use FreeView --
or there is probably a way to view them in Blender to see where they
intersect.

Could you slightly expand downward (and smooth -- it's quite jagged) the
outer skin surface in blender?

Eric

External Email - Use Caution

Dear all,

I solved the problem for Subject 09. In the Blender edit images that I sent you, there are no intersections (I analyzed the plot in detail); for this case, I only modified the outer skin. However, when I changed the outer skull solely, the problem finished. I exclusively employed mne.viz.plot_bem, although also I would consider Eric's options.

For new users, I recommend make little modifications in Blender, then check the BEM plots (mne.viz.plot_bem) and save the plots. The idea is that you detect step by step, which parts of the surfaces to modify and eliminate the intersections between the surfaces. Here is the original tutorial: https://mne.tools/stable/auto_tutorials/source-modeling/plot_fix_bem_in_blender.html#sphx-glr-auto-tutorials-source-modeling-plot-fix-bem-in-blender-py.

Only the next keyboard keys are necessaries in Blender:
TAB: To change to EDIT mode
C: To get a 'circle form' and select the parts that you want to change
G: To enlarge or reduce the pieces set (elemental)

Here the plot and other important files (download: https://correoipn-my.sharepoint.com/:f:/g/personal/jliconam1700_alumno_ipn_mx/ElKGzCPCRXtNorraicEzoDsBPkjYyqD5RbBB-NMHmCZ9EA?e=8gstBV):
Graph with outer skull changed
Blender image of the region changed
Outer skull .surf file
Outer skull fixed .obj file

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Thanks for all.

Best,
Ricardo.

El 26 oct 2020, a las 9:49, Eric Larson <larson.eric.d at gmail.com> escribi?:

        External Email - Use Caution

The first image did not come through. But in the second (corrected) one, in the lower left plot you can see the outer skull (yellow) surface come very close to the outer skin (peach) surface. `plot_bem` by default only shows some slices -- if you use mne Report to render the bem with `decim=1` you'll get an interactive slider where you can see all slices. There are probably some slices for which they do intersect. You can also plot them in 3D using `plot_alignment` with the `surfaces` argument, or use FreeView -- or there is probably a way to view them in Blender to see where they intersect.

Could you slightly expand downward (and smooth -- it's quite jagged) the outer skin surface in blender?

Eric

        External Email - Use Caution

Dear all,

I had problems with BEM surfaces of FreeSurfer, thus I tried to correct them with the software Blender. After manual editing, according to plots, the intersections between the outer skull and outer skin disappear. However, when I run my Python script to create the 3-layer BEM model (conductivity = (0.3, 0.006, 0.3)), I have the same error message: ?FAILED to create 3-layer BEM for sub009: Surface outer skull is not completely inside surface outer skin.?

I am using the ds117 dataset.

Plots (subject 9):

* Original plot without edit:MailScanner has detected a possible fraud attempt from "correoipn-my.sharepoint.com" claiming to be ?https://correoipn-my.sharepoint.com/:i:/g/personal/jliconam1700_alumno_ipn_mx/Ee725N_sYlhHtVMvMVDq7UABDrd6yjCwE9unGYMVVj3UvQ?e=co8vb4

* Plot after Blender edit: https://correoipn-my.sharepoint.com/:i:/g/personal/jliconam1700_alumno_ipn_mx/EQjGk_LZgyNItO-sJ8dYLZgB9a6W1HfqzqtiIEZYy6dlQA?e=KAlbM4

Any advice?

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Best,
Ricardo.
_______________________________________________
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
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/20201026/1fde8e95/attachment-0001.html

External Email - Use Caution

Hey Ricardo,

This is great information! Would you be up for making a Pull Request on
GitHub to modify this tutorial with updated instructions?

https://github.com/mne-tools/mne-python/blob/master/tutorials/source-modeling/plot_fix_bem_in_blender.py

This is what gets rendered to create the HTML tutorial.

Eric

External Email - Use Caution

Hi Eric,

Absolutely! This week I will prepare the updated instructions, make them understandable, and follow the MNE contributing guide.

Kind regards,
Ricardo.

El 27 oct 2020, a las 6:56, Eric Larson <larson.eric.d at gmail.com> escribi?:

        External Email - Use Caution

Hey Ricardo,

This is great information! Would you be up for making a Pull Request on GitHub to modify this tutorial with updated instructions?

https://github.com/mne-tools/mne-python/blob/master/tutorials/source-modeling/plot_fix_bem_in_blender.py

This is what gets rendered to create the HTML tutorial.

Eric

        External Email - Use Caution

Dear all,

I solved the problem for Subject 09. In the Blender edit images that I sent you, there are no intersections (I analyzed the plot in detail); for this case, I only modified the outer skin. However, when I changed the outer skull solely, the problem finished. I exclusively employed mne.viz.plot_bem, although also I would consider Eric's options.

For new users, I recommend make little modifications in Blender, then check the BEM plots (mne.viz.plot_bem) and save the plots. The idea is that you detect step by step, which parts of the surfaces to modify and eliminate the intersections between the surfaces. Here is the original tutorial: https://mne.tools/stable/auto_tutorials/source-modeling/plot_fix_bem_in_blender.html#sphx-glr-auto-tutorials-source-modeling-plot-fix-bem-in-blender-py.

Only the next keyboard keys are necessaries in Blender:
TAB: To change to EDIT mode
C: To get a 'circle form' and select the parts that you want to change
G: To enlarge or reduce the pieces set (elemental)

Here the plot and other important files (download: https://correoipn-my.sharepoint.com/:f:/g/personal/jliconam1700_alumno_ipn_mx/ElKGzCPCRXtNorraicEzoDsBPkjYyqD5RbBB-NMHmCZ9EA?e=8gstBV):
Graph with outer skull changed
Blender image of the region changed
Outer skull .surf file
Outer skull fixed .obj file

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Thanks for all.

Best,
Ricardo.

El 26 oct 2020, a las 9:49, Eric Larson <larson.eric.d at gmail.com <mailto:larson.eric.d at gmail.com>> escribi?:

        External Email - Use Caution

The first image did not come through. But in the second (corrected) one, in the lower left plot you can see the outer skull (yellow) surface come very close to the outer skin (peach) surface. `plot_bem` by default only shows some slices -- if you use mne Report to render the bem with `decim=1` you'll get an interactive slider where you can see all slices. There are probably some slices for which they do intersect. You can also plot them in 3D using `plot_alignment` with the `surfaces` argument, or use FreeView -- or there is probably a way to view them in Blender to see where they intersect.

Could you slightly expand downward (and smooth -- it's quite jagged) the outer skin surface in blender?

Eric

        External Email - Use Caution

Dear all,

I had problems with BEM surfaces of FreeSurfer, thus I tried to correct them with the software Blender. After manual editing, according to plots, the intersections between the outer skull and outer skin disappear. However, when I run my Python script to create the 3-layer BEM model (conductivity = (0.3, 0.006, 0.3)), I have the same error message: ?FAILED to create 3-layer BEM for sub009: Surface outer skull is not completely inside surface outer skin.?

I am using the ds117 dataset.

Plots (subject 9):

* Original plot without edit:MailScanner has detected a possible fraud attempt from "correoipn-my.sharepoint.com" claiming to be ?https://correoipn-my.sharepoint.com/:i:/g/personal/jliconam1700_alumno_ipn_mx/Ee725N_sYlhHtVMvMVDq7UABDrd6yjCwE9unGYMVVj3UvQ?e=co8vb4

* Plot after Blender edit: https://correoipn-my.sharepoint.com/:i:/g/personal/jliconam1700_alumno_ipn_mx/EQjGk_LZgyNItO-sJ8dYLZgB9a6W1HfqzqtiIEZYy6dlQA?e=KAlbM4

Any advice?

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Best,
Ricardo.
_______________________________________________
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

_______________________________________________
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
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/20201027/197a8fc3/attachment-0001.html

External Email - Use Caution

Hi Eric,

Four days ago, I sent some pull requests regarding the updated Blender tutorial (https://secure-web.cisco.com/1qokFUz7U6IOrBJWpTANaBhd8-5osLLRlxU3OM8EIAM91lGnMUls7p50uxxSL9p0zp9P1GzsOACotUcDhuDXO6Pfdd6FC5KJuf1I7xvpXsWydeK2Q6qdmkxqu2b_7DlszDlbpZfktIMTf9z1Xv6SMvuvUU9q-7dHvHSqaaD2UJifa1mn3F-cxhg9kt_y2nTmUfrUyRXATUlgyi_fTbAzxlw/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-python%2Fblob%2Fmaster%2Ftutorials%2Fsource-modeling%2Fplot_fix_bem_in_blender.py ).

Best,
Ricardo.

El 27 oct 2020, a las 22:02, Ricardo Licona <ricklicona at me.com> escribi?:

Hi Eric,

Absolutely! This week I will prepare the updated instructions, make them understandable, and follow the MNE contributing guide.

Kind regards,
Ricardo.

El 27 oct 2020, a las 6:56, Eric Larson <larson.eric.d at gmail.com <mailto:larson.eric.d at gmail.com>> escribi?:

        External Email - Use Caution

Hey Ricardo,

This is great information! Would you be up for making a Pull Request on GitHub to modify this tutorial with updated instructions?

https://secure-web.cisco.com/1qokFUz7U6IOrBJWpTANaBhd8-5osLLRlxU3OM8EIAM91lGnMUls7p50uxxSL9p0zp9P1GzsOACotUcDhuDXO6Pfdd6FC5KJuf1I7xvpXsWydeK2Q6qdmkxqu2b_7DlszDlbpZfktIMTf9z1Xv6SMvuvUU9q-7dHvHSqaaD2UJifa1mn3F-cxhg9kt_y2nTmUfrUyRXATUlgyi_fTbAzxlw/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-python%2Fblob%2Fmaster%2Ftutorials%2Fsource-modeling%2Fplot_fix_bem_in_blender.py

This is what gets rendered to create the HTML tutorial.

Eric

        External Email - Use Caution

Dear all,

I solved the problem for Subject 09. In the Blender edit images that I sent you, there are no intersections (I analyzed the plot in detail); for this case, I only modified the outer skin. However, when I changed the outer skull solely, the problem finished. I exclusively employed mne.viz.plot_bem, although also I would consider Eric's options.

For new users, I recommend make little modifications in Blender, then check the BEM plots (mne.viz.plot_bem) and save the plots. The idea is that you detect step by step, which parts of the surfaces to modify and eliminate the intersections between the surfaces. Here is the original tutorial: https://secure-web.cisco.com/1H9WjKy-NhRmLRgZiW-YAbeeYc8AONeTITfypLA_E4fGam5CSvCuY3xBeuIO19f6tHymyRZsA8LAAplDEKkAXEzcdS2ytwIdHRILQW0SwX3ALz3SI0raY3G-pEAFfKMYot6nfELeeSbvN1BhYUcCvZtVpHd_69pigyJpWg2k0546gkPvHZtwY4SynuWK2UuFqZnT54dO1CMisOC-7Zmmlog/https%3A%2F%2Fmne.tools%2Fstable%2Fauto_tutorials%2Fsource-modeling%2Fplot_fix_bem_in_blender.html%23sphx-glr-auto-tutorials-source-modeling-plot-fix-bem-in-blender-py.

Only the next keyboard keys are necessaries in Blender:
TAB: To change to EDIT mode
C: To get a 'circle form' and select the parts that you want to change
G: To enlarge or reduce the pieces set (elemental)

Here the plot and other important files (download: https://secure-web.cisco.com/1tY30vTQ8B8Edala6gH9c9NrVfdIc7Cj5dsuu0KJ55yWhhrFpRPe0Ym9a8Q7Q4YD4l4a9TaQ2bJHZWlJE13dTqnRaD7UMBVVd2oJp3i2FBiG_MAt1QsmBJLx4YRjiIsjzs5uABWhcYoYxYDht80sesegtUAA1LFioNwatjjM9inzgG3yhKP7pChitnFpxqezoMtT15GMt9vhPncAVQ8PeLA/https%3A%2F%2Fcorreoipn-my.sharepoint.com%2F%3Af%3A%2Fg%2Fpersonal%2Fjliconam1700_alumno_ipn_mx%2FElKGzCPCRXtNorraicEzoDsBPkjYyqD5RbBB-NMHmCZ9EA%3Fe%3D8gstBV):
Graph with outer skull changed
Blender image of the region changed
Outer skull .surf file
Outer skull fixed .obj file

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Thanks for all.

Best,
Ricardo.

El 26 oct 2020, a las 9:49, Eric Larson <larson.eric.d at gmail.com <mailto:larson.eric.d at gmail.com>> escribi?:

        External Email - Use Caution

The first image did not come through. But in the second (corrected) one, in the lower left plot you can see the outer skull (yellow) surface come very close to the outer skin (peach) surface. `plot_bem` by default only shows some slices -- if you use mne Report to render the bem with `decim=1` you'll get an interactive slider where you can see all slices. There are probably some slices for which they do intersect. You can also plot them in 3D using `plot_alignment` with the `surfaces` argument, or use FreeView -- or there is probably a way to view them in Blender to see where they intersect.

Could you slightly expand downward (and smooth -- it's quite jagged) the outer skin surface in blender?

Eric

        External Email - Use Caution

Dear all,

I had problems with BEM surfaces of FreeSurfer, thus I tried to correct them with the software Blender. After manual editing, according to plots, the intersections between the outer skull and outer skin disappear. However, when I run my Python script to create the 3-layer BEM model (conductivity = (0.3, 0.006, 0.3)), I have the same error message: ?FAILED to create 3-layer BEM for sub009: Surface outer skull is not completely inside surface outer skin.?

I am using the ds117 dataset.

Plots (subject 9):

* Original plot without edit:MailScanner has detected a possible fraud attempt from "correoipn-my.sharepoint.com" claiming to be ?https://secure-web.cisco.com/1I4HxU4tvm4W1m5K89kR1XyCOK-pd15w7iwdrJWT7oLArfPO_SuEWAFZ6qER9wDa4ePkWT_QU41xFvKyybNjpWUFnXFynSzaN1Oo0s35__5wLNT69_9QWNcPs6zieccWSyip3hVD8l3510EKAFlje-qK15SGymxDEj5frSyhIzeYmr255s_J4K46ccqFLz4epXzofX2lcr9RCypW0rMaG5A/https%3A%2F%2Fcorreoipn-my.sharepoint.com%2F%3Ai%3A%2Fg%2Fpersonal%2Fjliconam1700_alumno_ipn_mx%2FEe725N_sYlhHtVMvMVDq7UABDrd6yjCwE9unGYMVVj3UvQ%3Fe%3Dco8vb4

* Plot after Blender edit: https://secure-web.cisco.com/13CrGBUaaqkYPLMTi2xTmsl_xNtq-BzlrqdUiRzMB7zf-uUZIBsviFrf1Qtp5R4XbmA--N-8E9LbMqFkJgcLyMv3qZcy7yqoOcIUyC9UqrF8_YNp5gozGolsA8kJwZvtYCTJI5LdWPwwycMhOM5q4Eyz0d1H2zEK32YmXH8t-aopKSrU4ZqxNqMSmzdg_SxI9ONrxxGF0fQB70VxtKooDOg/https%3A%2F%2Fcorreoipn-my.sharepoint.com%2F%3Ai%3A%2Fg%2Fpersonal%2Fjliconam1700_alumno_ipn_mx%2FEQjGk_LZgyNItO-sJ8dYLZgB9a6W1HfqzqtiIEZYy6dlQA%3Fe%3DKAlbM4

Any advice?

OS: Mac Os X (Catalina 10.15.7)
MNE: 0.21.0
FreeSurfer: 6.0 (due to some problems with the recent versions and Mac Os X)

Best,
Ricardo.
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu <mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://secure-web.cisco.com/1O-RPlW004fc8CWxoZF8H_vG5_jrSkvF0wI7rUgjtByvtBsJG7HwgBlmDYJqwP785N7-JT7uAxVNMkQDO6x32nvACzxKybzdedgPA7Haf_qsULurxFyfNBMy-9PGwfn1k5Ck4UPBavEi06NdJHK0nl1ZSq2C8eZqnzgaFqh5gdJ-v5pp2A5OpRkCp29sKWa1Mqedw2FcpfNPNmNkOoGfbqw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu <mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://secure-web.cisco.com/1O-RPlW004fc8CWxoZF8H_vG5_jrSkvF0wI7rUgjtByvtBsJG7HwgBlmDYJqwP785N7-JT7uAxVNMkQDO6x32nvACzxKybzdedgPA7Haf_qsULurxFyfNBMy-9PGwfn1k5Ck4UPBavEi06NdJHK0nl1ZSq2C8eZqnzgaFqh5gdJ-v5pp2A5OpRkCp29sKWa1Mqedw2FcpfNPNmNkOoGfbqw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu <mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://secure-web.cisco.com/1O-RPlW004fc8CWxoZF8H_vG5_jrSkvF0wI7rUgjtByvtBsJG7HwgBlmDYJqwP785N7-JT7uAxVNMkQDO6x32nvACzxKybzdedgPA7Haf_qsULurxFyfNBMy-9PGwfn1k5Ck4UPBavEi06NdJHK0nl1ZSq2C8eZqnzgaFqh5gdJ-v5pp2A5OpRkCp29sKWa1Mqedw2FcpfNPNmNkOoGfbqw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu <mailto:Mne_analysis at nmr.mgh.harvard.edu>
https://secure-web.cisco.com/1O-RPlW004fc8CWxoZF8H_vG5_jrSkvF0wI7rUgjtByvtBsJG7HwgBlmDYJqwP785N7-JT7uAxVNMkQDO6x32nvACzxKybzdedgPA7Haf_qsULurxFyfNBMy-9PGwfn1k5Ck4UPBavEi06NdJHK0nl1ZSq2C8eZqnzgaFqh5gdJ-v5pp2A5OpRkCp29sKWa1Mqedw2FcpfNPNmNkOoGfbqw/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20201107/6b19d4c6/attachment-0001.html