function loadROI
%loads a ROI set from a file
    
    cd(get(findobj('tag', 'mnuLoadRoi'), 'userdata'));
    [FileName PathName] = uigetfile('*.mat','Choose ROI set to use');
    if numel(PathName) > 1
        set(findobj('tag', 'mnuLoadRoi'), 'userdata', PathName);

        % put the new data in its home
        load([PathName FileName]);
        if exist('ROI', 'var')
            for i = 1:numel(ROI)
                ROI(i).handle = line(nan, nan, 'parent', findobj('tag', 'imageAxis'));
            end                       
            setappdata(getappdata(0, 'imageDisplay'), 'ROI', ROI);
            set(findobj('tag', 'cboRoiNumber'), 'string', num2str((1:length(ROI))'), 'value', length(ROI));                                                                              
        else
            error('Not a valid ROI file');
        end
        if exist('fiducials', 'var')
            setappdata(getappdata(0, 'imageDisplay'), 'fiducials', fiducials);
        end

        %update the current image to show ROI
        drawROI;
        displayImage;
    end