Leadfield information in bst

Hello,

I would like to use only normal-oriented sources, so that each vertex position had only one source that was oriented normal to the local cortical surface,

(I know that I can do it in the source estimation to choose the constrained source) but my question how can I have the leadfield with the axis oriented normal to the local cortical surface,
because in Brainstorm the output of the leadfield is Number of sensors X (3 X Number of source), so how can I have leadfield as: Number of sensors X (1 X Number of source (where the orientation is oriented normal to the local cortical surface ))

Thank in advance!

The leadfield is always computed for 3 orientations at each point.
To apply an orientation constraint to it, use bst_gain_orient.m:

Use the VertNormal list of normals from the cortex surface:
Gain_normal = bst_gain_orient(sHeadModel.Gain, sSurface.VertNormals);

Hi Francois,

The step that I did,

  1. Computed the head model using cortex surface (source space)
  2. exported the computed gain and cortex_15002V to the matlab
  3. applying what you suggested
    Gain_normal = bst_gain_orient(gain.Gain, cortex_15002V.VertNormals);
    image
  4. Then I put this new Gain_normal matrix instead of the previos one (102x45006)

image
5) then I imported again this new gain, when I view the lead field I get this error:
image

  1. when I simulate from scout I have also another error:

can you help me please?

In the headmodel files saved in the Brainstorm database, the Gain matrix must remain defined for all the orientations.
The field GridOrient in the same file is applied on the fly when reading the head model for estimating the sources: