Source map specific orientation

Hi there Brainstorm,

I present a cortical AEP and their corresponding source maps where A is the original source map when you open it from BST GUI and panel B which is panel A but enlarged by 5 mouse rolls and rotated slightly. I would like to know if there is a way to numerically specify the enlargement factor and the degree of rotation at a certain axis. I am imagining a BST GUI (or some other means) to specify the same enlargement factor and degree of rotation and apply it to all figures (for the purposes of manuscript preparation). If there is already a way to do this that I am not aware of, please let me know as well.
Many thanks in advance.

With Brainstorm there is always a way. If you only want to have the same view (zoom and camera angle) for all the figures:

  1. Open all the figures that you need
  2. With the mouse on one figure, set manually the zoom and camera angle.
  3. Copy that view to all the other figures. On the modified figure, right-click on then Figure > Apply this view to all the figures. Or press =

If you want to be able to numerically set the same view.

  1. Open one figure, and set the view (this is done once)
  2. Run this snippet to get all the variables to reproduce the view:
%% 1. Get all variables to reproduce view
% Get Axes handle
hSrcFig = gcf;
hSrcAxes = findobj(hSrcFig, '-depth', 1, 'Tag', 'Axes3D');
% Get view angle
[az,el] = view(hSrcAxes);
% Get cam position
pos = campos(hSrcAxes);          
% Get cam target
tar = camtarget(hSrcAxes);
% Get cam up vector
up = camup(hSrcAxes);
% Get zoom factor
camva = get(hSrcAxes, 'CameraViewAngle');

To apply this same vire to other 3D figures, use those six variables (az, el, pos, tar, up and camva), in this other snippet:

%% 2. Set (apply) those variables to all 3D figures
% Get all figures 3D figures
hAllFig = bst_figures('GetFiguresByType', {'3DViz'});
for i = 1:length(hAllFig)
    % Get Axes handle
    hDestAxes = findobj(hAllFig(i), '-depth', 1, 'Tag', 'Axes3D');
    % Set view angle
    view(hDestAxes, az, el);
    % Set cam position
    campos(hDestAxes, pos);
    % Set cam target
    camtarget(hDestAxes, tar);
    % Set cam up vector
    camup(hDestAxes, up);
    % Set zoom factor
    set(hDestAxes, 'CameraViewAngle', camva);
end
2 Likes

Wonderful thank you very much - it's working nicely. :smile: