0001 function job_plot_cmap_load_cortex(inst_id,brainfile,verbose)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 global vbmeg_inst;
0014
0015 error('This function will become obsolete. (Feb 20 2012 taku-y)')
0016
0017
0018
0019
0020
0021 if ~exist(brainfile),
0022 warndlg(['File ' brainfile ' does not exist.']);
0023 return;
0024 end
0025
0026 vbmeg_inst.plotcmap{inst_id}.brainfile = brainfile;
0027
0028
0029 [Vinf,F,xx,inf_C,xxA] = vb_load_cortex(brainfile,'Inflate');
0030
0031 if ~isempty(vbmeg_inst.plotcmap{inst_id}.Jact),
0032 if max(vbmeg_inst.plotcmap{inst_id}.ix_act)>size(Vinf,1),
0033 warndlg(['Index of dipole currents exceeds the number of ' ...
0034 'vertices.']);
0035 return;
0036 end
0037 end
0038
0039 V = vb_load_cortex(brainfile);
0040 vbmeg_inst.plotcmap{inst_id}.V = V;
0041 vbmeg_inst.plotcmap{inst_id}.Vinf = Vinf;
0042 vbmeg_inst.plotcmap{inst_id}.F = F;
0043 vbmeg_inst.plotcmap{inst_id}.inf_C = inf_C;
0044 vbmeg_inst.plotcmap{inst_id}.xxA = xxA;
0045
0046
0047 Vtal = vb_load_cortex(brainfile,'Talairach');
0048 Vmni = vb_load_cortex(brainfile,'MNI');
0049 if ~exist('Vtal','var') || isempty(Vtal), Vtal = zeros(size(V)); end
0050 if ~exist('Vmni','var') || isempty(Vmni), Vmni = zeros(size(V)); end
0051 vbmeg_inst.plotcmap{inst_id}.Vtal = Vtal*1e3;
0052 vbmeg_inst.plotcmap{inst_id}.Vmni = Vmni*1e3;
0053
0054
0055 [nextDD,nextIX] = vb_load_cortex_neighbour(brainfile);
0056 vbmeg_inst.plotcmap{inst_id}.nextDD = nextDD;
0057 vbmeg_inst.plotcmap{inst_id}.nextIX = nextIX;
0058
0059
0060
0061
0062
0063 job_plot_cmap_update_filterradius(inst_id);
0064 job_plot_cmap_update_timecourse(inst_id);
0065 job_plot_cmap_update_spatialpattern(inst_id);