acttivity map is transformed to act map in the reduced brain model vb_act_to_reduce_brain(actfile, areafile, actkey) vb_act_to_reduce_brain(actfile, areafile, actkey, reducekey,reduced_actfile) --- Input actfile = 'xxx.act.mat' areafile = 'xxx.area.mat' actkey --- Optional input reducekey : area key to specify reduced brain model = 'reduced_cortex' (Default) reduced_actfile ; act file for reduced brain model = 'xxx_reduced.act.mat' (Default) --- Output act index corresponding to actkey in the actfile is converted to the act index in the reduced brain model Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_act_to_reduce_brain(actfile, areafile, actkey, ... 0002 reducekey,reduced_actfile) 0003 % acttivity map is transformed to act map in the reduced brain model 0004 % vb_act_to_reduce_brain(actfile, areafile, actkey) 0005 % vb_act_to_reduce_brain(actfile, areafile, actkey, reducekey,reduced_actfile) 0006 % --- Input 0007 % actfile = 'xxx.act.mat' 0008 % areafile = 'xxx.area.mat' 0009 % actkey 0010 % --- Optional input 0011 % reducekey : area key to specify reduced brain model 0012 % = 'reduced_cortex' (Default) 0013 % reduced_actfile ; act file for reduced brain model 0014 % = 'xxx_reduced.act.mat' (Default) 0015 % --- Output 0016 % act index corresponding to actkey in the actfile 0017 % is converted to the act index in the reduced brain model 0018 % 0019 % Copyright (C) 2011, ATR All Rights Reserved. 0020 % License : New BSD License(see VBMEG_LICENSE.txt) 0021 0022 if ~exist('reducekey','var'), reducekey = 'reduced_cortex'; end; 0023 0024 Area = vb_get_area(areafile,reducekey); 0025 0026 if isempty(Area), 0027 fprintf('No reduced brain key : [%s] in [%s]\n',reducekey,areafile) 0028 return 0029 end 0030 0031 Ixall = Area.Iextract; 0032 0033 if ~exist('reduced_actfile','var') | isempty(reduced_actfile), 0034 reduced_actfile = vb_change_file_basename(actfile, '_reduce'); 0035 end 0036 0037 act = vb_get_act(actfile, actkey); 0038 0039 if ~isempty(act) 0040 xxP0 = act.xxP; 0041 xxP = xxP0(Ixall); 0042 act.xxP = xxP; 0043 vb_add_act([reduced_actfile], act); 0044 else 0045 fprintf('No act key : [%s] in [%s]\n',actkey,actfile) 0046 end