Error: the FEM mesh generation failed

Hello all,

I have run the FEM mesh generation (using SimNIBS), but at the end of it I get the following error:

My anatomy folder looks like this currently (I am using the USCBrain default)

image

If I open the FEM mesh I see only the right half:

and when I look at the file contents, I get the following:

image

Which looks very similar to the contents that are shown in the FEMmesh tutorial (https://neuroimage.usc.edu/brainstorm/Tutorials/FemMesh)

So I'm wondering if the FEM meshing was performed correctly and if not, what went wrong and how I can fix it.

Many thanks in advance!

Hello @gvh

Thanks for reporting this issue.

From your figures and from the file contents, it seems that the FEM mesh is correct,
I think the error is not on the anatomy part but on the functional data tab.

You can use this FEM mesh for the next steps without any issues.
Regarding the display, you can change the views and the display options from the surface tab option/ resect (X, Y Z)

@Francois do you have any idea about this error?
I think it's happened when bst imports the simnibs-EEG channels

Best,

The error you got is related with the last step of the SimNIBS import: the default 10-10 EEG positions estimated by SimNIBS. There is actually no way to import the EEG positions in the default anatomy, as it does not have any correspondence in the "Functional data" tab of the database explorer.

There was a bug related with the import of a SimNIBS output folder as the default anatomy.
This is now fixed (update Brainstorm to get the fix): https://github.com/brainstorm-tools/brainstorm3/commit/c57e1bb08866d95f23aa6a2be5d70706dcc1bd19

However, please note that in most cases, it is not indicated to replace the ICBM152 template in the default anatomy. If you only have one subject your protocol: configure the subject NOT to use the default anatomy, and import the SimNIBS anatomy in the subject anatomy folder instead of the default anatomy.

About the half head: this is only related with the configuration of your display.
Make sure you read all the FEM-related tutorials before diving into your own data:

Dear @Francois,

Thanks for the reply. So it it correct to conclude that my FEM mesh is not useable for source estimation and that I should rerun it?

So it it correct to conclude that my FEM mesh is not useable for source estimation and that I should rerun it?

No, the FEM model is probably fine.
If you don't need the EEG positions, then you may have everything that you need.

However, it depends what you intend to do with this database.
Having deleted the ICBM152 anatomy might cause some issues at some point (even if I can't think of any at this point).
I mostly wanted to mention that if you have only one subject in your database, this is not the cleanest way to proceed...

Dear @Francois,

Ah ok, thanks for the clarification.

The reason I am using a single subject is because I do not have MRI scans of all my subjects so I use a template. I thought that it would then be easiest to then only use a "single subject" and input all EEG data (I only have EEG data) in the functional tab of the subject. My main goal is to generate source timeseries for the scouts in the USCBrain atlas.

So it would be best to create a single subject for this or would you suggest another approach?

In general, if you have data recorded from N participants, you would create N subjects in the database.
If they all use the same template anatomy, then configure them all with the option "Default anatomy: Yes", and set the anatomy template you want to use in the "Default anatomy" folder.

With only one participant, or with simulation studies: Create one subject in the database with the option "Default anatomy: No". Import the anatomy of the subject or set the template to be used in the subject anatomy folder.

But this is mostly a matter of personal preferences. The best way to organize your data is maybe the way that feels the most natural to you.