Code covered by the BSD License  

Highlights from
Dicom Operator - EsmeProcess

image thumbnail

Dicom Operator - EsmeProcess


Jun Li (view profile)


06 Sep 2013 (Updated )

EsmeProcess functions dicom image operation including viewing, drawing, writing and statistic.

function addmenuitems(filenames)
% addmenuitems: adds file names to sub-menu 'Recent files' of menu 'file'.
%   Usage: addmenuitems(filenames)
% Defined variables:
%   filenames:   a cell array, saves the file names to be added

% Find the File main menus handle, and add an MRU sub-menu directly to
% it.
hFileMenu = findall(gcf, 'Label', 'File');
hMruMenu = uimenu('Label', 'Recent files', 'Parent', hFileMenu);

% Move to between New and Open by reordering hFileMenus Children menu
% items.
hAllMenuItems = allchild(hFileMenu);

% Place in 2nd position, just above the "Open" item.
set(hFileMenu, 'Children', fliplr(hAllMenuItems([2:end-1,1,end])));

% Add the list of recent files, one item at a time.
for fileIdx = 1:length(filenames)
    uimenu(hMruMenu, 'Label', filenames{fileIdx},                       ...
        'Callback', {@openFile, filenames{fileIdx}});


Contact us