The function you need is import_label.m
:
First of all, update Brainstorm, as I added the option to specify the file format from the command line (which was not possible for volumes before): Import labels from script: Specify FileFormat from command line · brainstorm-tools/brainstorm3@7c5cb88 · GitHub
To load a surface atlas, like you seem to be doing in this example:
SurfaceFile = 'sepi01/tess_cortex_pial_low.mat';
ScoutFile = 'brodmann.nii.gz';
isNewAtlas = 1;
[sAtlas, Messages] = import_label(SurfaceFile, ScoutFile, isNewAtlas, [], 'MRI-MASK');
However, it is not recommended to load a volume atlas on a surface. This leads to very poorly defined ROIs. Use volume a volume source model instead:
https://neuroimage.usc.edu/brainstorm/Tutorials/TutVolSource
And then to load the atlas:
SurfaceFile = 'sepi01/tess_cortex_pial_low.mat';
ScoutFile = 'brodmann.nii.gz';
isNewAtlas = 1;
ResultsFile = 'link|sepi01/SPIKE/results_Dipoles_EEG_KERNEL_220907_1900.mat|sepi01/SPIKE/data_SPIKE_average_220907_1855.mat';
ResultsMat = in_bst_results(ResultsFile, 0, 'GridLoc');
[sAtlas, Messages] = import_label(SurfaceFile, ScoutFile, isNewAtlas, [], 'MRI-MASK');
Not straightforward indeed... we'll work on improving this in the future.
Other question: you are loading a parcellation in subject space. Has this volume shen214 really been registered and resliced to match the subject T1 MRI?
Otherwise, if this is in MNI space, you should use 'Volume mask or atlas (dilated, MNI space)' / 'MRI-MASK-MNI'