Error when saving image out to file from MRI Viewer

Hi,

Brainstorm 30-Mar-2019.

I right clicked on a channel file and displayed the SEEG electrodes using the MRI Viewer. Right-clicked on image, Snapshot > open as image. When I then hit File > Save as, I get the following error when I tried to save the image:


Dot indexing is not supported for variables of this type.

Error in out_figure_image (line 301)
isForceScreencapture = strcmpi(FigureId.Type, 'Video') && ~isempty(iDS) &&
ismember(GlobalData.DataSet(iDS).Figure(iFig).Handles.PlayerType, {'VLC', 'WMPlayer'});

Error in view_image>@(h,ev)out_figure_image(hFig) (line 140)
uimenu(hMenu, 'Label', 'Save as...', 'Accelerator', 's', 'Callback',
@(h,ev)out_figure_image(hFig));

Error while evaluating Menu Callback.


strcmpi(FigureId.Type, 'Video') gives an error, FigureId is empty,
ismember(GlobalData.DataSet(iDS).Figure(iFig).Handles.PlayerType, {'VLC', 'WMPlayer'}) gives an error, iDS and iFig are empty

Regards,
Ken

Bug fixed: https://github.com/brainstorm-tools/brainstorm3/commit/56650c79c10b1a6add81b7c8092b707e050340ed

Note that you'd probably get a nicer image by using directly the popup menu "Snapshot > Save as image" from the MRI Viewer window, rather than reopening the figure as an image and then saving it.