Dear BST team,
I'm working on an EcoG project, where I've imported and preprocessed each subject's anatomy and set EcoG electrodes location using brainstorm. However, I am also running some analyses using custom matlab scripts. I would like to integrate these analyses with BST's plotting and visualization capabilities, so that I can assign each electrode marker an individual face color or size from a gradient of values representing the range of results of my external analyses.
I know that I can set marker size and marker face colors by using the figure handle to change current object properties thusly:
% create 3Dviz figure for sample subject
SurfaceFile = 'C:\LocationInDrive\tess_cortex_central_low.mat';
ChannelsFile = 'C:\LocationInDrive/channel.mat';
[hFig, iDS, iFig] = view_surface(SurfaceFile);
[hFig, iDS, iFig] = view_channels(ChannelsFile,'ECOG',1,0);
% set electrodes marker size and color
hFig.CurrentObject.MarkerSize = 8,
hFig.CurrentObject.MarkerEdgeColor = [0 1 0]).
hFig.CurrentObject.MarkerFaceColor = [0 1 0]).
However, this will change all electrodes to the same size and color values, as shown in the attached files. I was wondering how to set each marker (i.e. electrode) to have an different color or size, asuming I already have a color and size value per electrode in separate matrices.
I assume I would need to access the data in hFig that specifies the location of each electrode and then write a loop to plot each electrode individually, setting the desired properties at each iteration, but I'm unsure how to access marker location or whether setting these properties per electrode is actually possible.
Any help, idea or feedback about how to get this done would be highly appreciated.
Thanks in advance!