OpenMEEG Volume error in computation

Hi, I have a problem with calculating the BEM volume. As settings, I select MRI volume and in the OpenMEEG options "Use adaptative integration".

As soon as I give the OK, in the Command Windows various errors begin to appear that I have reported below. The version of the toolbox I use is 2.4.1 because the latest version didn't even allow me to do the BEM Cortex calculation. At least with this version, I can calculate the BEM Cortex model.

I await your news.

Index exceeds the number of array elements (0).

Error in cs_compute (line 158)
AC(2) PC(2) IH(2);

Error in tess_envelope (line 171)
Transf = cs_compute(sMri, 'tal');

Error in panel_sourcegrid>CreatePanel (line 61)
[sEnvelope, sCortex] = tess_envelope(CortexFile, 'convhull',
GridOptions.nVerticesInit, .001, []);

Error in panel_sourcegrid (line 30)

Error in gui_show_dialog (line 51)
[bstPanel, panelName] = fcnPanel('CreatePanel', varargin{:});

Error in bst_headmodeler (line 256)
sGrid = gui_show_dialog('Volume source grid', @panel_sourcegrid, 0, [],

Error in panel_headmodel>ComputeHeadModel (line 669)
[OPTIONS, errMessage] = bst_headmodeler(OPTIONS);

Error in panel_headmodel (line 27)

Error in panel_protocols>TreeHeadModel (line 1251)
[OutputFiles, errMessage] = panel_headmodel('ComputeHeadModel', iChanStudies);

Error in panel_protocols (line 44)

Error in tree_callbacks>@(h,ev)panel_protocols('TreeHeadModel',bstNodes) (line 2505)
gui_component('MenuItem', jPopup, [], 'Compute head model',
IconLoader.ICON_HEADMODEL, [], @(h,ev)panel_protocols('TreeHeadModel', bstNodes));

The problem is not related with OpenMEEG, but due to the definition of the various coordinate systems in your MRI.

The error at line 158 in cs_compute suggests that the variables AC, PC or IH are empty, because of their conversion to the SCS coordinate system failed, most likely due to missing fiducials.

I would suggest you import again the anatomy from the beginning, making sure your defined correctly all the fiducial points (or compute the MNI normalization and use the default fiducial locations).
If this doesn't solve your issue, please right-click on the MRI > File > View file contents, and copy paste here the lines that define the SCS and NCS structures.

Thank you for your reply. I calculated the MNI normalization, as you suggested, and managed to start OpenMEEG. Now I have another problem and I attach the screenshot below. I also changed the subject and I have the same error.


Could you please start by following the Brainstorm introduction tutorials, using the example dataset provided, and then go through the OpenMEEG BEM tutorial using the protocol "TutorialIntroduction"?

This would probably point out what you are doing incorrectly.
If you ended up with messed up anatomy folders, there are probably things you are not doing right, and it will be difficult to debug if we are not starting from a solid ground.

Thank you so much for your support. After several attempts, I solved the various problems by deleting all the BEM surfaces and recalculating everything from the beginning. It is not the first time that I have used this model on the same subjects but it is the first time that I compute the BEM Volume for invasive recordings.