function [] = initializeArtoa4()
%INITIALIZEARTOA4 Initializes variables required for artoa4 and creates the main window if required.
%   

global artoaDataInput artoaDataOutput artoaWorkspace artoaGui;

%% When the gui exists, focus it
if isfield(artoaGui, 'figures') && isfield(artoaGui.figures, 'main')
    figure(artoaGui.figures.main.Number);
    return
end

%% Initalize required variables
artoaDataInput = struct();
artoaDataOutput = struct();
artoaWorkspace = struct();
artoaWorkspace.showAllDataPoints = false;
artoaGui = struct();
artoaGui.figures = struct();
artoaGui.main = struct();


%% Start artoa4

artoa.gui.main();


end

