function MainWindow
%% Auslesen der Bildschirmgröße
scrsz = get(0,'ScreenSize');
%% Anlegen des Hauptfensters
MainFigure = figure('Position', [0.0005*scrsz(3), 0.034*scrsz(4), 0.998*scrsz(3), 0.945*scrsz(4)],...
                                'Units', 'normalized',...
                                'Resize','off', ...
                                'MenuBar', 'none', ...
                                'Name', 'Testprogramm', ...
                                'Tag', 'MainFigure');

%% Bild in erste Axes legen
obj.elements.disp_axes_picture = axes('parent', MainFigure, ...
                                      'position', [0.05 0.3 0.45 0.69], ...
                                      'units', 'normalized');
img = imread('Cube_9.4x9.4x9.4.jpg');
imagesc(img);
axis equal
axis off
grid on
xlabel('x')
ylabel('y')
zlabel('z')

%% Plot in zweiter Axes erstellen
obj.elements.disp_axes = axes('parent', MainFigure, ...
                              'position', [0.05 0.3 0.45 0.69], ...
                              'Projection', 'perspective', ...
                              'units', 'normalized');
                        
% Alle Einheiten auf Pixel stellen
set(MainFigure, 'Units', 'pixel');
set(obj.elements.disp_axes, 'Units', 'pixel');

p1 = plot3(3, 3, 0, 'sr', 'MarkerEdgeColor','g','MarkerFaceColor','g');
hold on
p2 = plot3(2, 2, 0, 'sr', 'MarkerEdgeColor','b','MarkerFaceColor','b');
hold on
p3 = plot3(0, 0, 0, 'sr', 'MarkerEdgeColor','r','MarkerFaceColor','r');
set(obj.elements.disp_axes, 'Color', 'none')

rotate3d on
% dcm_obj = datacursormode(gcf);
% set(dcm_obj,'enable','on')
































% %                             axis([0 1 0 1])
% 
% obj.elements.input_but = uicontrol('style', 'pushbutton', ...
%                                    'string', 'Get cursor position', ...
%                                    'units', 'normalized', ...
%                                    'position', [0.5 0.94 0.1 0.04], ...
%                                    'callback' , {@func_get_pos, MainFigure});
% 
% obj.elements.draw_but = uicontrol('style', 'pushbutton', ...
%                                   'string', 'Draw positions', ...
%                                   'units', 'normalized', ...
%                                   'position', [0.65 0.94 0.1 0.04], ...
%                                   'callback' , {@func_draw_pos, MainFigure});
% 
% obj.elements.show_but = uicontrol('style', 'pushbutton', ...
%                                    'string', 'Show data', ...
%                                    'units', 'normalized', ...
%                                    'position', [0.5 0.84 0.1 0.04], ...
%                                    'callback' , {@func_show_data, MainFigure});
%                                
% obj.elements.draw_3D_but = uicontrol('style', 'pushbutton', ...
%                                      'string', 'Draw 3D-Model', ...
%                                      'units', 'normalized', ...
%                                      'position', [0.65 0.84 0.1 0.04], ...
%                                      'callback' , {@func_draw_3D_model, MainFigure});
%                                
% obj.elements.show_data_listbox = uicontrol('style','listbox',...
%                                            'units','normalized', ...
%                                            'position',[0.5 0.44 0.28 0.34],...
%                                            'String',{});
%                                        
% obj.elements.change_x_Twistangle_slider = uicontrol('style','slider',...
%                                                     'Min',-360,'Max',360,...
%                                                     'Value',0, ...
%                                                     'SliderStep',[(1/720) (10/720)], ...
%                                                     'units','normalized', ...
%                                                     'position',[0.8 0.94 0.19 0.04],...
%                                                     'callback' , {@change_x_Twistangle, MainFigure});
% 
% obj.elements.change_y_Twistangle_slider = uicontrol('style','slider',...
%                                                     'Min',-360,'Max',360,...
%                                                     'Value',0, ...
%                                                     'SliderStep',[(1/720) (10/720)], ...
%                                                     'units','normalized', ...
%                                                     'position',[0.8 0.84 0.19 0.04],...
%                                                     'callback' , {@change_y_Twistangle, MainFigure});
%                                                 
% obj.elements.change_z_Twistangle_slider = uicontrol('style','slider',...
%                                                     'Min',-360,'Max',360,...
%                                                     'Value',0, ...
%                                                     'SliderStep',[(1/720) (10/720)], ...
%                                                     'units','normalized', ...
%                                                     'position',[0.8 0.74 0.19 0.04],...
%                                                     'callback' , {@change_z_Twistangle, MainFigure});   
%                                                 
% obj.elements.change_zoom_factor_slider = uicontrol('style','slider',...
%                                                     'Min',0,'Max',10000,...
%                                                     'Value',20, ...
%                                                     'SliderStep',[(1/10000) (10/10000)], ...
%                                                     'units','normalized', ...
%                                                     'position',[0.8 0.64 0.19 0.04],...
%                                                     'callback' , {@change_zoom_Factor, MainFigure});
%  %% Objektdaten initialisieren                             
% obj.database.clickedPos.x = []; 
% obj.database.clickedPos.y = [];
% obj.database.XLim = get(obj.elements.disp_axes, 'Xlim');
% obj.database.YLim = get(obj.elements.disp_axes, 'Ylim');
% 
% obj.database.image = img;
% obj.model = [];

%% Objektdaten speichern
setappdata(MainFigure, 'objects', obj)