Generating head surface and problem while exporting head surface to MATLAB

Hi all,

I've been working on creating a head model in BrainStorm to model tDCS electrodes. To do this, I followed the documentation and imported the anatomy folder containing the surface files of the respective subject. Afterwards, I generated the head surface by right-clicking on MRI image -> MRI segmentation -> Generate head surface. This successfully creates the head surface, however, when I export this to Matlab (right click on head mask -> File -> Export to Matlab) it does not exports the "Curvature" information that I am interested in, rather it exports the struct including only Faces and Vertices - along with Comment and History.
Also, I tried to do it only with import MRI(without the anatomy folder) and generated head surface directly with T1 image. These method was giving me the Curvature values in the struct when I exported it to MATLAB before, however, I can not get these values since yesterday even though I've been doing it in the same way I did before.
My other question would be: is giving the whole anatomy folder crucial for generating the head surface? Since I can generate the head surface without giving the specific anatomy folder, does that mean it uses default anatomy folder to generate the head surface/mask, therefore, it is not subject-specific? Or, is only MRI image enough for generating the head surface/mask?

Thank you so much for your help in advance.
Gülce Lale

could you share the structure that you are getting?

I just repeated what you did, and the curvature is within the structure.

You need just the MRI to get the individualized surface.

For more realistic head models you can check also the FEM tutorials :

https://neuroimage.usc.edu/brainstorm/Tutorials/FemMesh
and
https://neuroimage.usc.edu/brainstorm/Tutorials/FemMedianNerve#FEM_mesh_with_SimNIBS

1 Like

thank you very much for the advice and information! unfortunately, I can't share the structure, but I can say that this was the structure I was getting before. After a while, my head surfaces stopped having the Curvature information. May I ask, which version of Brainstorm are you using?

Last version. But I believe there was no change in the data related to the surface in the recent releases.

Update your brainstorm and try again.

Thanks! Also, would FEM mesh give the Curvature information as well? I managed to create a FEM model, however, I don't see any Curvature array in my struct when I export it to MATLAB. There are 7 fields including Comment, Vertices, Elements, Tissue, TissueLabels, Tensors, and History. Unfortunately, none of them has information about the Curvature of the mesh.

That's great already.

You are obtaining a FEM mesh, and you need to construct the surfaces now.
From Brainstorm, right-click on the FEM mesh, and then extract surfaces. You will then obtain the 5 surfaces with all the fields that you need.

1 Like

Amazing! thank you so much. After I updated and generated the FEM mesh it finally worked, and I can obtain the curvature values now. It's still not working with only creating the head mask from T1w images, however, FEM mesh is definitely better.

Best wishes,
Gülce

1 Like

The curvature and all the other missing fields are computed when opening the file for visualization the first time. After extracting the head surface from the MRI, just double-click on it to display it, close the figure, and your head surface will have all the missing fields.