Hello everyone,
Does anyone know how to call the Brainstorm function that finds the point of maximum activity, creates a new scout from it, and reconstructs it?
Is it possible to call this function and include it in a pipeline to automate the process?
Thank you in advance.
The function is panel_scout('CreateScoutMax')
The example below is based on the files computed during the introduction tutorial, and shows how to use it
% 0. Close all figures and clear memory
bst_memory('UnloadAll', 'Forced');
% 1. Source file path
% (Obtained with right-click on the souce file, then: File > Copy file path to clipboard)
sourceFilePath = 'link|Subject01/S01_AEF_20131218_01_600Hz_notch/results_MN_MEG_KERNEL_260318_1727.mat|Subject01/S01_AEF_20131218_01_600Hz_notch/data_deviant_average_260318_1725.mat';
% 2. Plot sources
view_surface_data([], file_short(sourceFilePath));
% Set the time of analysis (Optional)
panel_time('SetCurrentTime', 0.375);
% 3. Create a new atlas for maximal scout
sAtlas = db_template('Atlas');
sAtlas.Name = 'AtlasForMaximal';
panel_scout('SetAtlas', [], 'Add', sAtlas);
% 4. Create maximal scout
panel_scout('CreateScoutMax');
% 5. Rename new scout (Optional)
[sScout, iScout] = panel_scout('GetSelectedScouts');
sScout.Label = 'MaximalScout';
panel_scout('SetScouts', [], iScout, sScout);
panel_scout('UpdatePanel');
panel_scout('ReloadScouts');
% 6. Close all figures and clear memory
bst_memory('UnloadAll', 'Forced');
Please note that this is only available for Surface source with Constrained orientation
1 Like