Loading EEG Recording

Hello All,

I am a new user of Brainstorm. I was loading an EEG recording (converted from .mat to brain visions (.eeg) format using fieldtrip) and want to compute a head model using the standard MRI where I encountered the following error message:

“No valid sensor types to estimate a head model”

I would like to know how to fix this. Looking forward for the response.

Best regards,
Kidist

Hi Kidist,

First, I encourage you to import directly the BrainVision files in Brainstorm without “converting it” with FieldTrip. If you multiply the conversion steps, you increase the risk of errors (both manipulation mistakes and software bugs).

For calculating a head model for your data, you need to import the positions of your EEG electrodes (if you have digitized them with a Polhemus system), or use one of the default sets distributed with Brainstorm (right-click on the condition > Use default EEG cap).

  • Check/fix the electrodes positions with the menu “MRI registration > Edit” in the channel file popup menu.
  • The number of entries in the channel file and the data files must match.
  • The electrodes you want to use for the reconstruction must have the type “EEG” set. To edit channel types: right click on the channel file > Edit channel.

Please read and follow carefully all the introduction tutorials (12+3). They are based on MEG recordings, but except for a few steps (like the import of electrodes positions), all the workflow is exactly the same.

Cheers,
Francois

Hi Francois,

Thank you very much for the fast response.

I have the original data in .mat format that is why I converted it to .eeg to import to Brainstorm.
I also don’t have the digitized electrode positions in a separate file so I used the default EEG cap (Neuroscan Quick-Cap 64). Then calculate the head model but I was unable to estimate the sources correctly as I expect. I think it is from the noise variance calculation section as I am using an epilepsy data and not sure which region to choose as the baseline. Any suggestion?

The other question is I want to use the individual head, so I extract all the surfaces from the individual MRI using Brainsuite. But then when I tried to import it to Brainstorm, I get the following error message:


** Error: Line 96: Undefined variable “containers” or class “containers.Map”.
**
** Call stack:
** >in_label_bs.m>generate_label_map at 96
** >in_label_bs.m at 42
** >import_label.m at 351
** >import_anatomy_bs.m at 235
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@import_anatomy_bs,iSubject,[],[],1) at 470
**


Looking forward for the response.

Best regards,
Kidist

Hi Kidist,

All the suggestions we can give about the noise covariance is in the tutorials:
http://neuroimage.usc.edu/brainstorm/Tutorials/TutNoiseCov

I’m transferring your import question to the BrainSuite developers.

Cheers,
Francois

Hi Kidist,

I am one of the developers working on BrainSuite and improving its interface with Brainstorm. Can you tell me which version of Matlab you are using? Based on the error message there seems to be trouble finding a function that’s built-in to Matlab, but it may be more recent of an addition than I thought.

Thanks,
– Andrew

Hi Andrew,

I am using MatlabR2008a

Regards,
Kidist

Hi Kidist,

The code for importing BrainSuite atlases was using some features that appeared in more recent versions of Matlab.
Andrew fixed it, now it should work with all the versions of Matlab released after 2006.
The update is online (menu Help > Update Brainstorm)
Let us know how it goes.

Cheers,
Francois

Hi Francois,

Importing the Brainsuite atlases was successful.

[B]1.[/B] I then tried to compute sources using sLORETA for the individual head model (3-shell) and received the following error message:


** Error: Line 2031: Subscript indices must either be real positive integers or logicals.
**
** Call stack:
** >figure_3d.m>BlendAnatomyData at 2031
** >figure_3d.m>UpdateSurfaceColor at 1978
** >bst_call.m at 28
** >macro_methodcall.m at 39
** >figure_3d.m at 40
** >panel_surface.m>figure_callback at 714
** >panel_surface.m>UpdateSurfaceColormap at 1494
** >panel_surface.m>UpdateSurfaceData at 1387
** >panel_surface.m>SetSurfaceData at 1157
** >bst_call.m at 26
** >macro_methodcall.m at 37
** >panel_surface.m at 38
** >view_surface_data.m at 255
** >tree_callbacks.m at 257
** >bst_call.m at 28
** >panel_protocols.m>CreatePanel/protocolTreeClicked_Callback at 107
**



** Error: Line 2031: Subscript indices must either be real positive integers or logicals.
**
** Call stack:
** >figure_3d.m>BlendAnatomyData at 2031
** >figure_3d.m>UpdateSurfaceColor at 1978
** >bst_call.m at 28
** >macro_methodcall.m at 39
** >figure_3d.m at 40
** >panel_surface.m>figure_callback at 714
** >panel_surface.m>SetShowSulci at 459
** >panel_surface.m>ButtonShowSulciCallback at 434
**


[B]2.[/B] The second problem is I tried to compute the BEM head model for this individual anatomy and received the following error message:


** Error: OpenMEEG call: om_assemble -HM
** “C:\Users\Mideksa-k.brainstorm mp\openmeeg.geom”
** “C:\Users\Mideksa-k.brainstorm mp\openmeeg.cond”
** “C:\Users\Mideksa-k.brainstorm mp\openmeeg_hm.bin”
** OpenMEEG error #1:
** om_assemble version 2.2.0 (exported) compiled at Feb 19 2013 14:01:10
**
** | ------ om_assemble
** | -HM
** | C:\Users\Mideksa-k.brainstorm mp\openmeeg.geom
** | C:\Users\Mideksa-k.brainstorm mp\openmeeg.cond
** | C:\Users\Mideksa-k.brainstorm mp\openmeeg_hm.bin
** | -----------------------
** Sorted List : 1 0 2
** Sorted Domains : Brain Skull Scalp Air
** Total number of points : 3065
** Total number of triangles : 6162
** Checking
** Mesh 0 : internal conductivity = 1 and external conductivity = 0.0125
** Mesh 1 : internal conductivity = 0.0125 and external conductivity = 1
** Mesh 2 : internal conductivity = 1 and external conductivity = 0
** triangles 1534 and 1635 are intersecting
** triangles 1534 and 1656 are intersecting
** !!!
** !!! WARNING !!!
** !!!
** 2 meshes are intersecting !
** Mesh Info :
** # points : 1005
** # triangles : 1998
** Euler characteristic : 6
** Min Area : 1.45875e-006
** Max Area : 0.000245896
** Mesh Info :
** # points : 976
** # triangles : 2000
** Euler characteristic : -24
** Min Area : 2.46227e-006
** Max Area : 0.000341614
** triangles 559 and 763 are intersecting
** triangles 655 and 763 are intersecting
** triangles 811 and 840 are intersecting
** triangles 1354 and 1370 are intersecting
** triangles 1370 and 1395 are intersecting
** triangles 1545 and 1577 are intersecting
** triangles 1545 and 1640 are intersecting
**


Looking forward for the response.

Thanks!

Regards,
Kidist

Hi Kidist,

  1. I don’t know where this is coming from, but I cannot investigated the problem because the line numbers do not match the current version of Brainstorm.
    Can you update Brainstorm and try again?

  2. The BrainSuite inner and outer skull surfaces cannot be used for running OpenMEEG because they are intersecting.
    Try again with BEM surfaces generated from Brainstorm: http://neuroimage.usc.edu/brainstorm/Tutorials/TutBem

Cheers,
Francois

Hi Francois,

  1. When I try to update brainstorm it displays the following error message:

Exception in thread “Thread-13” java.lang.OutOfMemoryError: Java heap space
at ice.util.io.LazyCachedInputStream.OEAB(OEAB)
at ice.util.io.LazyCachedInputStream.arraycopy(OEAB)
at ice.util.io.LazyCachedInputStream.read(OEAB)
at ice.util.io.MarkerInputStream.read(OEAB)
at org.brainstorm.file.BstDownload.downloadThread(BstDownload.java:162)
at org.brainstorm.file.BstDownload$2.run(BstDownload.java:111)


  1. When I try to compute BEM surfaces it displays the following error message:

** Error: Line 25: fullfile at 25
** Not enough input arguments.
**
** Call stack:
** >fullfile.m at 25
** >tess_bem.m at 78
** >bst_call.m at 28
** >tree_callbacks.m>@(h,ev)bst_call(@tess_bem,iSubject) at 502
**


Looking forward for the response.

Best regards,
Kidist

Hi Kidist,

  1. I’ve just replied to this on this other thread:
    http://neuroimage.usc.edu/forums/showthread.php?1213-problem-with-Update-available-online-06-Aug-2013

  2. This is because it’s looking for the template BEM surfaces in the default Colin27 folder. This folder brainstorm3/defaults/anatomy/MNI_Colin27 was renamed to simply “Colin27”.
    The problem should be fixed with this new update.

Cheers,
Francois

Note for BrainVision / BrainAmp users:
A bug was found in the application of the channel gain, the amplitudes read where sometimes incorrect.
Please update Brainstorm for reading correct amplitudes from the BrainVision files.