File Formats and Data Structures

SSLTool: A Matlab toolbox for EEG surface Laplacian

Home | Download | Screenshots | Project detail

 

SSLTool uses Matlab structure data class extensively and uses .mat file to store information.

 

File Formats

Model

The model file is a Matlab .mat file containing two variables:

  • Head
  • Electrode

See following sections for details. Also see SSL_MODEL_DEFAULT.mat file in data directory for an example.

Electrode

Electrode info can be stored in a text file. The file must have 4 columns, either tab or space delimited, with the first column giving the electrode label (a string, cannot be a pure number, thus A01 is legitimate but 001 is not) and the next three depicting the X, Y and Z spatial coordinates.

Fiducial landmark points may also be included in this file, SSLTool will automatically recognize channels with label LPA, RPA, NAS and VER and extract these as the Fiducial points.

See SSL_ELECTRODE_EXAMPLE.txt for an example.

 

Data Structures

The Head structure is defined by two primary fields:

  • Head.Vertex
    Size [numOfVertices,3] array of vertex coordinates, in 3D Euclidean space.
  • Head.Face
    Size [numOfFaces,3] array of triangulation indices into Head.Vertex, index starts at 1.

The following auxiliary fields are also automatically generated during mesh creation:

  • Head.VertexNormal
    Size [numOfVertices,3] array describing the unit surface normal vector at each vertex.
    Computed with function SSLMESHVERTEXNORMAL.
  • Head.VertexNormalJacobian
    Size [3,3, numOfVertices] array of the Jacobian matrix at each vertex.
    Computed with function SSLMESHCURVATURE.

Electrode

The Electrode data structure is defined by a primary field:

  • Electrode.Coordinate
    Size [numOfElectrodes,3] array of coordinates, in 3D Euclidean space.

and optional fields:

  • Electrode.Label
    Size [numOfElectrodes,1] character cell array, giving the label for each electrode. This field can be omitted, in which case numerical labels from 1 to numOfElectrodes are created automatically.
  • Electrode.Fiducial
    Size [4,3] array of the fiducial landmarks. These are usually the points that the coordinate digitization systems resort to for base frame setup. Row 1 through 4 specifies the coordinate of LPA, RPA, NAS, and VER points, in that order. These correspond to Left Pre-Auricular point, Right Pre-Auricular point, Nasian point and Vertex point. If some of these points are not available, the corresponding rows are NANed.

Data

The data structure has a primary field:

  • D.Data
    Size [numOfFrames,numOfChannels] array, where numOfChannels should equal to numOfElectrodes.

and an optional field:

  • D.ExcludeChannel
    A numeric array defining the indices of channels (electrodes) to be excluded from further usage.

See SSL_DATA_DEFAULT.mat file in data directory for an example.