function ihb_TalSpaceSetMenuCheck
%==================================================================================
% Set check marks for all menu items
%==================================================================================
%----------------------------------------------------------------------------------
%   24.04.01    Sergey Pakhomov
%----------------------------------------------------------------------------------
dflFileName = ihb_FileFolderName('dfl');
%------------------------------------------------------------------------------
%     Voxel size submenu
%------------------------------------------------------------------------------
load(dflFileName, 'ihbdfl_tal_x_vox', 'ihbdfl_tal_y_vox', 'ihbdfl_tal_z_vox');
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_VoxSizeMenu111');
if ihbdfl_tal_x_vox == 1    % it is assumed that voxel is cubic
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_VoxSizeMenu222');
if ihbdfl_tal_x_vox == 2
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_VoxSizeMenu444');
if ihbdfl_tal_x_vox == 4
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
%------------------------------------------------------------------------------
%     Renderer submenu
%------------------------------------------------------------------------------
load(dflFileName, 'ihbdfl_renderer');
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_RendererMenuZbuffer');
if strcmp(ihbdfl_renderer, 'zbuffer');
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_RendererMenuOpenGL');
if strcmp(ihbdfl_renderer, 'OpenGL');
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
%------------------------------------------------------------------------------
%     Transparency submenu
%------------------------------------------------------------------------------
load(dflFileName, 'ihbdfl_renderer');
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_TransparencyMenu');
if strcmp(ihbdfl_renderer, 'zbuffer');
    set(hMenu, 'Visible', 'off');
else 
    if strcmp(ihbdfl_renderer, 'OpenGL');
        set(hMenu, 'Visible', 'on');
        load(dflFileName, 'ihbdfl_transparency');
        hMenuOpaque = findobj('Type', 'uimenu', 'Tag', 'ihb_TransparencyMenuOpaque');
        hMenuLow = findobj('Type', 'uimenu', 'Tag', 'ihb_TransparencyMenuLow');
        hMenuMedium = findobj('Type', 'uimenu', 'Tag', 'ihb_TransparencyMenuMedium');
        hMenuHigh = findobj('Type', 'uimenu', 'Tag', 'ihb_TransparencyMenuHigh');
        set(hMenuOpaque, 'Checked', 'off');
        set(hMenuLow, 'Checked', 'off');
        set(hMenuMedium, 'Checked', 'off');
        set(hMenuHigh, 'Checked', 'off');

        switch ihbdfl_transparency
        case 1.0
            set(hMenuOpaque, 'Checked', 'on');
        case 0.8
            set(hMenuLow, 'Checked', 'on');
        case 0.5
            set(hMenuMedium, 'Checked', 'on');
        case 0.2
            set(hMenuHigh, 'Checked', 'on');
        end
    end
end
%------------------------------------------------------------------------------
%     3D axes submenu
%------------------------------------------------------------------------------
load(dflFileName, 'ihbdfl_bAxesIsClusterOnly');
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_Axes3DMenuClusterOnly');
if ihbdfl_bAxesIsClusterOnly == 1
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_Axes3DMenuWholeBrain');
if ihbdfl_bAxesIsClusterOnly == 0
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
%------------------------------------------------------------------------------
%     Line width submenu
%------------------------------------------------------------------------------
load(dflFileName, 'ihbdfl_line_width');
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_LineWidthMenuThin');
if ihbdfl_line_width == 1
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_LineWidthMenuNormal');
if ihbdfl_line_width == 2
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
hMenu = findobj('Type', 'uimenu', 'Tag', 'ihb_LineWidthMenuThick');
if ihbdfl_line_width == 4
    set(hMenu, 'Checked', 'on');
else
    set(hMenu, 'Checked', 'off');
end
