Compute head model using OpenMEEG ends with an error

Hello everyone,

I have just started working with Brainstorm to reconstruct sources from my EEG data. I have 48 channels EEG data (easycap locations). I have followed the introductory tutorials and have successfully established/created the protocol, anatomy section, but in the functional data section, when I try to compute head model using OpenMEEG BEM option (followed along the tutoriall) my computation ends up with the error. The screenshot of the error is attached. I looked for the possible option of solution but the errors seems different that the mentioned one and I am unable to proceed. Could you please help?

Thanks
Rab

bs error

As often in such case, can you make the files in
C:\Users\Muhammad Mawaz\tmp\openmeeg available ?
That would help us understand what happened.

Otherwise, the only idea I could have is that the space in "Muhammad Mawaz" might create the problem even though the command line in the output seems reasonable.

SO there is no directory "C:\Users\Muhammad Mawaz\tmp\openmeeg" but instead "C:\Users\Muhammad Nawaz.brainstorm\tmp". The files located in this directory is shown in the screenshot.

Thanks
Rab

bs error2

Please these files together, upload them somewhere and post the download link here, so that @papadop can look into this issue.
Thanks

Hi,

Thanks for your reply.
I have tried to increase the space in my C drive to avoid the issue of memory, in case if the error is because of memory. However, it does not helped and I ended up with the same error again.

I was just noticing and found that the error occurred at the stage of "assembling dipoles source matrix".

There are 9 files generated in the "C:\Users\Muhammad Nawaz.brainstorm\tmp" location and the link to these files is here download

Thanks
Rab

I have tried to increase the space in my C drive to avoid the issue of memory, in case if the error is because of memory. However, it does not helped and I ended up with the same error again.

By memory, we mean the RAM of your computer, not the space available on your hard drive.
If you don't have enough RAM to run the computation, there is not much you can do except for:

  • using lower resolutions for the BEM surfaces (e.g. ~500V) and the cortex surface (~5000V)
  • using a different computer

Hi,

I have tried both ways. First I lowered the resolution for BEM surfaces (500v as you recommended). But I ended with the same issue. Then I tried to run the the program on a different computer having 16GB RAM (before I was running it on 8GB system). But again no luck!

When I was adjusting the EEG channel locations, I did it somehow manually (because I loaded the channel location file from eeglab. when I visualize it, it was not correctly positioned in Brainstrom, So I have to do some manual alignment to adjust it). I was just wondering, would you think that could be the possible reason for this issue?

My another colleague have already computed a head model in fieldtrip for the same dataset. Is there any possibility to load the already computed headmodel from the fieldtrip into Brainstrom and proceed?

Thanks
Rab

I have tried both ways. First I lowered the resolution for BEM surfaces (500v as you recommended). But I ended with the same issue. Then I tried to run the the program on a different computer having 16GB RAM (before I was running it on 8GB system). But again no luck!

@papadop Can you please look into this?

When I was adjusting the EEG channel locations, I did it somehow manuall. ... would you think that could be the possible reason for this issue?

No, unless your electrodes are inside the head volume.
Have you projected the electrodes on the head surface?
Please post a screen capture of the head surface + electrodes.
If you could also include another image with scalp + inner skull + outer skull + cortex (with transparency, as in the BEM tutorial), that could help us detect other problems.

another colleague have already computed a head model in fieldtrip for the same dataset. Is there any possibility to load the already computed headmodel from the fieldtrip into Brainstrom and proceed?

No, this is quite complicated to do. Converting forward model structures is not straightforward.
But you can try computing FieldTrip forward models from Brainstorm with process FieldTrip: ft_prepare_leadfield.

Hi,
Thank you for your quick reply.

yes

The capture of the head surface+electrodes are below
brainstorm1

Can you see it in the image? I hope i posted it what you asked? Let me know if you mean something else.
3D_Subject01

Thanks
Rab

Hi,

I just figured out the issue. I found that there were some dipoles outside the BEM layers, which was raised as a warning. I tried to fix this warning using Force inside skull option mentioned in the BEM tutorial page [https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem]. After that, the computation went smooth and I am able to get the head model.

Thanks
Rab

Yes, these were exactly the screen captures I was asking for. They do look go.
Glad you figured out the solution.

For future users reading this thread: