This function is used to get cortical activity data. --- Syntax act = vb_get_act(actfile,key) --- Input actfile: Cortical activity file (.act.mat) key : ID of cortical activity data. --- Optional Input --- Output act.xxP : Activities for this cortical activity data. act.key : ID of this data. act.comment: Comment on this data. --- Comment Activities are treated as nondimensional values, regard less of the source of the data (e.g., SPM t-value). The meaning of each of activity data should be managed by the user. --- Example >> actfile = './TY/data/TY.act.mat'; >> key = 'Uniform'; >> act = vb_get_act(actfile,key); --- History 2004-11-09 Taku Yoshioka 2006-8-23 M. Sato If area is not found, [] is returned Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function act = vb_get_act(actfile,key) 0002 % This function is used to get cortical activity data. 0003 % 0004 % --- Syntax 0005 % act = vb_get_act(actfile,key) 0006 % 0007 % --- Input 0008 % actfile: Cortical activity file (.act.mat) 0009 % key : ID of cortical activity data. 0010 % 0011 % --- Optional Input 0012 % 0013 % --- Output 0014 % act.xxP : Activities for this cortical activity data. 0015 % act.key : ID of this data. 0016 % act.comment: Comment on this data. 0017 % 0018 % --- Comment 0019 % Activities are treated as nondimensional values, regard less of the 0020 % source of the data (e.g., SPM t-value). The meaning of each of activity 0021 % data should be managed by the user. 0022 % 0023 % --- Example 0024 % >> actfile = './TY/data/TY.act.mat'; 0025 % >> key = 'Uniform'; 0026 % >> act = vb_get_act(actfile,key); 0027 % 0028 % --- History 0029 % 2004-11-09 Taku Yoshioka 0030 % 2006-8-23 M. Sato If area is not found, [] is returned 0031 % 0032 % Copyright (C) 2011, ATR All Rights Reserved. 0033 % License : New BSD License(see VBMEG_LICENSE.txt) 0034 0035 act = []; 0036 if exist(actfile, 'file') ~= 2 0037 error('Activity map file is not found.'); 0038 else 0039 load(actfile,'Act'); 0040 end 0041 0042 for i = 1:length(Act) 0043 if strcmp(Act{i}.key,key) 0044 act = Act{i}; 0045 return; 0046 end 0047 end 0048 disp(['Activity map ' key ' is not found.']); 0049 0050 return