Home > functions > job > job_plot_currentmap_dir > job_plot_cmap_load_cortex.m

job_plot_cmap_load_cortex

PURPOSE ^

Load cortical surface model

SYNOPSIS ^

function job_plot_cmap_load_cortex(inst_id,brainfile,verbose)

DESCRIPTION ^

 Load cortical surface model

 --- Syntax
 function job_plot_cmap_load_cortex(inst_id,brainfile,verbose)

 --- History
 2008-09-01 Taku Yoshioka

 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 job_plot_cmap_load_cortex(inst_id,brainfile,verbose)
0002 % Load cortical surface model
0003 %
0004 % --- Syntax
0005 % function job_plot_cmap_load_cortex(inst_id,brainfile,verbose)
0006 %
0007 % --- History
0008 % 2008-09-01 Taku Yoshioka
0009 %
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
0012 
0013 global vbmeg_inst; 
0014 
0015 error('This function will become obsolete. (Feb 20 2012 taku-y)')
0016 
0017 %
0018 % Load cortical surface model
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 % Cortical surface model
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 % Standard brain coordinate
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 % Load neighbour data for filter calculation
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 % Update plots
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);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005