Home > vbmeg > functions > gui > preAnalysis > fmri > pa_fmri_merge_parm.m

pa_fmri_merge_parm

PURPOSE ^

merge fmri_parm which has fmri gui has and inputted fmri_parm fields.

SYNOPSIS ^

function pa_fmri_merge_parm(fig, merge_parm)

DESCRIPTION ^

 merge fmri_parm which has fmri gui has and inputted fmri_parm fields.
 [USAGE]
    pa_fmri_merge_parm(<fig> <,fmri_parm>);
 [IN]
           fig : figure handle of fmri parameter gui.
    merge_parm : To be merged fmri_parm.

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pa_fmri_merge_parm(fig, merge_parm)
0002 % merge fmri_parm which has fmri gui has and inputted fmri_parm fields.
0003 % [USAGE]
0004 %    pa_fmri_merge_parm(<fig> <,fmri_parm>);
0005 % [IN]
0006 %           fig : figure handle of fmri parameter gui.
0007 %    merge_parm : To be merged fmri_parm.
0008 %
0009 % Copyright (C) 2011, ATR All Rights Reserved.
0010 % License : New BSD License(see VBMEG_LICENSE.txt)
0011 
0012 %
0013 % --- Previous check
0014 %
0015 if ~exist('fig', 'var')|| isempty(fig) || ~ishandle(fig)
0016     error('invalid figure handle.');
0017 end
0018 if ~exist('merge_parm', 'var')
0019     error('merge_parm is a required parameter.');
0020 end
0021 
0022 %
0023 % --- Main Procedure
0024 %
0025 
0026 % load data
0027 data = guidata(fig);
0028 
0029 parm_names = fieldnames(merge_parm);
0030 for k=1:length(parm_names)
0031     data.fmri_parm.(parm_names{k}) = merge_parm.(parm_names{k});
0032 end
0033 
0034 % save data
0035 guidata(fig, data);
0036

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005