saveInterim.m 786 B
function [] = saveInterim(~, ~)
%SAVEINTERIM Saves the current state of ARTOA4 to the file specified by dialog.
%
global artoaWorkspace artoaConfig artoaDataInput;
%% Get required variables
folder = artoa.data.getMember(artoaConfig, {'directory', 'interim'}, pwd());
filter = artoa.data.getMember(artoaConfig, {'filemask', 'interim'}, '*.itm');
%% Ask for filename
[filename, pathname] = uiputfile(fullfile(folder, filter));
filepath = fullfile(pathname, filename);
%% Remove path_rfb
if isfield(artoaDataInput, 'path_rfb')
tmp = artoaDataInput;
artoaDataInput = rmfield(artoaDataInput, 'path_rfb');
end
save(filepath, 'artoaWorkspace', 'artoaDataInput', 'artoaConfig');
%% Restore if required
if exist('tmp', 'var')
artoaDataInput = tmp;
clear tmp;
end
end