Hi
I have multiple graphs of ERPs constructed using the extract clusters process. Is there a way to create a multi-panel image with several of these graphs in one image for publication, either in Brainstorm or through export of these images to MatLab?
You can make screen captures of each figure and put them together with any image editor.
For making each screen capture, use either the key PrintScreen and then CTRL+V, or right-click > Snapshot.
Making the background of the figures white before the export would probably make your images look nicer for publication.
Hi Francois,
Thank you. Is there a way to 'Snapshot' multiple images simultaneously?
Programmatically, you can call directly function out_figure_image
.
You can find additional information about scripting with Brainstorm here:
Hi Francois.
For displaying sources on the MRI viewer - is there a way to set the cross-hairs/coordinates to the middle (so all images can have the same standard)?
Additionally, is there a way to extract an image using the function out_figure_image set at these coordinates and at a particular time point?
For displaying sources on the MRI viewer - is there a way to set the cross-hairs/coordinates to the middle (so all images can have the same standard)?
You have a button "Set the current coordinates" next to the zoom buttons at the bottom of the MRI viewer.
Corresponding call from a script, if you want to automate this:
figure_mri('SetLocation', cs, hFig, [], XYZ);
% cs = coordinate system ('scs', 'mni', 'world' or 'scs')
% XYZ = [x, y, z]
Additionally, is there a way to extract an image using the function out_figure_image set at these coordinates and at a particular time point?
This would save the contents of the MRI viewer figure:
out_figure_image(hFig, 'test.png');
You can call it after the setting the coordinates (as before), and after setting the time:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Reference:_Display_functions
Thanks Francois. Could you advise how I locate the data for the MRI image if sFiles is the group averaged CDM source file? I'm not sure which field to to use. Also how do I set time within the script?
% Process: Select files using search query
sFiles = bst_process('CallProcess', 'process_select_search', [], [], ...
'search', '(([path CONTAINS "1_Source_avg_CDM_Uncon_z_norm"] AND [name CONTAINS "11_right"] AND [name CONTAINS "CG"]))')
hFig = view_mri({sFiles.FileName}, 'mriimage', 'EEG');
% cs = coordinate system ('mri', 'mni', 'world' or 'scs')
% XYZ = [x, y, z]
Figure_1 = figure_mri('SetLocation', mri, hFig, [], [99, 135, 73]);
Could you advise how I locate the data for the MRI image if sFiles is the group averaged CDM source file?
Get the subject structure, get the first Anatomy entry, and load the corresponding MRI.
The Scripting tutorial includes all the information you need for this.
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting
Also how do I set time within the script?
Please see the section I posted previously:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Reference:_Display_functions
Thanks. I have the file but the image doesn't seem to respond to setting the time. From the scripting tutorial the image doesn't need to be designated in the code?
% Process: Select files using search query
sFiles = bst_process('CallProcess', 'process_select_search', [], [], ...
'search', '(([path CONTAINS "1_Source_avg_CDM_Uncon_z_norm"] AND [name CONTAINS "CG"]))')
sStudy = bst_get('Study', sFiles(1).iStudy);
sSubject = bst_get('Subject', sStudy.BrainStormSubject);
MriFile = sSubject.Anatomy(sSubject.iAnatomy).FileName;
hFig = view_mri(MriFile);
bst_colormaps('SetColormapName', 'anatomy', 'jet');
panel_time('SetCurrentTime', 1);
out_figure_image(hFig, 'test.png');
I have the file but the image doesn't seem to respond to setting the time.
Fig = view_mri(MriFile);
panel_time('SetCurrentTime', 1);
There is no time in an MRI file.