📄 mri_updateparent.m
字号:
function [mri] = mri_updateparent(UserData,focus)
% mri_updateparent - General GUI data handing for MRI Toolbox
%
% Useage: [mri] = mri_updateparent(UserData,focus)
%
% 'UserData' is obtained from get(gcbf,'UserData'), where all
% the necessary parameters and stored for each GUI, including
% the handles of any GUI parent.
%
% 'focus' is a boolean option that switches whether the
% parent is the current figure (1, default) or not (0).
%
% This function returns the mri struct to both the matlab
% workspace and any direct parent of the GUI calling
% this function.
%
% $Revision: 1.2 $ $Date: 2004/02/07 01:41:51 $
% Licence: GNU GPL, no express or implied warranties
% History: 04/2002, Darren.Weber@flinders.edu.au
% - extracted from individual gui* functions
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if ~exist('focus','var'), focus = 1; end
if isfield(UserData,'parent'),
if isfield(UserData.parent,'gui'),
% Get the userdata from the parent
parent = get(UserData.parent.gui,'UserData');
if isfield(parent,'mri') & isfield(UserData,'mri'),
% Update the parent mri structure
parent.mri = UserData.mri;
set(UserData.parent.gui,'UserData',parent);
% Make the parent the current figure
end
if focus,
figure(UserData.parent.gui); end
end
end
if isfield(UserData,'mri'),
if ~isempty(UserData.mri),
mri = UserData.mri;
end
end
return
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -