Hi,
I have created a function that, starting from Volumes of Activation of some fMRI data (in this case they are fMRI data downloaded from NeuroSynth of specific tasks, like naming in this case), project them on subject’s SCS and find the closest central cortex vertices, derived from CAT12, through a simple KNNsearch. After that, it creates an Atlas template and populate it with the various scouts detected:
projVertices = find(maskOnCortex);
scoutTemplate = db_template('Scout');
scoutTemplate.Vertices = projVertices;
scoutTemplate = panel_scout('SetScoutsSeed', scoutTemplate, cortexVerts);
scoutTemplate.Label = atlas.Labels{b,2};
scoutTemplate.Color = scoutColor;
atlasTemplate.Scouts(end+1) = scoutTemplate;”
and then it proceed to save the updated surface struct:
surfStruct.Atlas(end+1) = atlasTemplate;
bst_save(surfFile, surfStruct, 'v7');”
It seems to work just fine, I am able to see the scouts in Brainstorm GUI. Problem is that if I want to use, now, some GUI function, like duplicate an Atlas of the cortex on which I manually craeted these new scouts (central_15002V in this case), it pops up an error:
I tried opening a different surface, central_164089V, on which I did not create scouts and atlases from Matlab code, and the GUI functions atlas and scouts related work just fine.
I attach here the structs of central_15002V and central_164089V for reference:
Have I made some mistakes in creating atlas and scouts from code? I followed parts of codes found in panel_scouts if I remember correctly.
Thanks in advance for help!
Zanchi


