Store brain activity map into cortical activity file [syntax] job_plot_cmap_print_spatialpattern(inst_id) [history] ????-??-?? Taku Yoshioka 2008-08-28 Taku Yoshioka 2008-10-23 Taku Yoshioka 2010-12-01 taku-y [internal change] 'Jinfo' replaces 'MEGinfo'. 2010-12-06 taku-y [enhancement] Jinfo.version>=0.9 supported. 2010-12-08 taku-y [internal change] vb_version_cmp used. 2012-01-26 sako [minor change] n_trial -> "n_trial" was replaced to "ix_trial" 2012-05-02 taku-y [internal change] Use job_plot_cmap_get_spatialpattern() to get spatial pattern to be registered. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function job_plot_cmap_register_activity(inst_id) 0002 % Store brain activity map into cortical activity file 0003 % 0004 % [syntax] 0005 % job_plot_cmap_print_spatialpattern(inst_id) 0006 % 0007 % [history] 0008 % ????-??-?? Taku Yoshioka 0009 % 2008-08-28 Taku Yoshioka 0010 % 2008-10-23 Taku Yoshioka 0011 % 2010-12-01 taku-y 0012 % [internal change] 'Jinfo' replaces 'MEGinfo'. 0013 % 2010-12-06 taku-y 0014 % [enhancement] Jinfo.version>=0.9 supported. 0015 % 2010-12-08 taku-y 0016 % [internal change] vb_version_cmp used. 0017 % 2012-01-26 sako 0018 % [minor change] n_trial -> "n_trial" was replaced to "ix_trial" 0019 % 2012-05-02 taku-y 0020 % [internal change] Use job_plot_cmap_get_spatialpattern() to get 0021 % spatial pattern to be registered. 0022 % 0023 % Copyright (C) 2011, ATR All Rights Reserved. 0024 % License : New BSD License(see VBMEG_LICENSE.txt) 0025 0026 global vbmeg_inst; 0027 if isempty(vbmeg_inst.plotcmap{inst_id}.V), return; end 0028 if isempty(vbmeg_inst.plotcmap{inst_id}.Jact), return; end 0029 0030 % --- global variables 0031 ix_trial = vbmeg_inst.plotcmap{inst_id}.ix_trial; 0032 t = vbmeg_inst.plotcmap{inst_id}.t; 0033 Jinfo = vbmeg_inst.plotcmap{inst_id}.Jinfo; 0034 Tstart = vbmeg_inst.plotcmap{inst_id}.Tstart; 0035 V = vbmeg_inst.plotcmap{inst_id}.V; 0036 0037 % get current map 0038 J0 = job_plot_cmap_get_spatialpattern(inst_id); 0039 0040 % store activity map 0041 [brain_dir,brain_file] ... 0042 = vb_file_select({'.act.mat'},'Select activity map file'); 0043 0044 if ~isempty(brain_file), 0045 actfile = [brain_dir filesep brain_file{1}]; 0046 0047 prompt = {'Enter activity map ID'}; 0048 title = 'Activity map registration'; 0049 lines= 1; 0050 def = {'new activity map'}; 0051 str = inputdlg(prompt,title,lines,def); 0052 0053 if isempty(str), 0054 return; 0055 elseif ~isempty(str{1}), 0056 act_new.key = str{1}; 0057 act_new.xxP = J0(:); 0058 0059 vb_add_act(actfile,act_new); 0060 end 0061 end 0062 0063 return;