Issue with tables saved in Brainstorm matrix files

Hello,

I’m currently working on integrating informations in a table information in brainstorm. Here is the structure we used:

Path: /NAS/home/jeanborn/brainstorm_db/ForTuto/data
Name: Brigadoi_montages/OM_ROI3_8S_16D_7A_4cm_complex_lambda_10/matrix_table_260709_1653.mat
--------------------------------------------------------------------------------------------
  |  
  |- FileName:     ''
  |- Comment:      'Metrics results'
  |- Value:        [10.2768, 87.7023, 5]
  |- Std:          []
  |- Time:         1
  |- Description:  {'total_sensitivity', 'coverage', 'nOverlap'}
  |- DisplayUnits: ''
  |- RowNames:     {'OM_ROI3_8S_16D_7A_4cm_complex_lambda_10'}
  |- ColNames:     {'total_sensitivity', 'coverage', 'nOverlap'}

When i do "view as table", then the row name is wrong :

Can anyone tell me if I did something wrong ?

Also, since we are generating one of this table per subject, is there an easy way in Brainstorm to concatenate tables with same header or would you be interested in me creating such a thing ?

Thank you very much,
Jean-Eudes

Hello @jeanborn

There are fields such as: FileName, RowNames , ColNames that are not part of Brainstorm matrix files (which are the ones used for tables).

Brainstorm is not designed to handle tables, thus the limitations it has at handling the row and column names, currently it works well for one or the other, when set in the Description field.

There is the processes Standardize > Concatenate time (columns) and Standardize > Concatenate signals (rows). However this does not handle the concatenation of columns headers (as they are usually time points).

I'll commend directly on PR that you proposed.

1 Like

@jeanborn, please check the update in Commit: c3b18b5

The names for columns and rows are given in the Description field.

  • Row names: Description is a cell array of size [nRows,1]
  • Column names: Description is a cell array of size [1, nColumns]
  • Row and Column names: Description is a cell array of size [nRows, nColumns]
    The element (1,1) is a cell with two elements {'FirstRowName', 'FirstColName'}

In addition, in that commit, the handling of concatenating column and row names is handled

Check this snippet:

sMat = db_template('matrixmat');
sMat.Comment = 'Metrics results';
sMat.Value   = [0,1,2,3; 0,4,5,6];
sMat.Time    = [];                  
sMat.Description = cell(2,4);
sMat.Description(1,:) = {{'R1', 'C1'}, 'C2', 'C3', 'C4'};
sMat.Description(2:end,1) = {'R2'};
1 Like

Hello Raymundo,
I just tested the fix. It works great !

Thank you so much and have an great day !
Jean-Eudes