Issue with panel_scout

Hi,
I'm trying to script the scout displays on cortex surface (only ROIs, not time-series). And I'm really struggling.
That's my code:

bst_memory('UnloadAll', 'Forced');
sCortex.iAtlas = find(strcmpi({sCortex.Atlas.Name}, 'S4'));
sScouts=sCortex.Atlas(sCortex.iAtlas).Scouts;
% View cortex
hFigSurf1 = view_surface(CortexFile, , , 'NewFigure');
figure_3d('SetStandardView', hFigSurf1, 'right');
panel_surface('SetSurfaceSmooth', hFigSurf1, 1, .6, 0);
panel_surface('SetShowSulci', hFigSurf1, 1, 1);
panel_scout('SetScoutsOptions', 1, 1, 1, 'all', 0.7, 1, 0, 0)

and the result varies across the runs.
The S4 altlas always has three scouts.
Sometimes, only one scout is displayed, sometimes all scouts are displayed, I don't understand why.

With the same script:
first run
image
second run
image

This is not easy to do, these were designed to be interactive tools only.

You may need to read and understand many functions from the panel_scout.m file.
Start with function PlotScout.

1 Like