Home > functions > job > job_edit_act_dir > job_edit_act_update_spatialpattern.m

job_edit_act_update_spatialpattern

PURPOSE ^

Update spatial pattern

SYNOPSIS ^

function job_edit_act_update_spatialpattern(inst_id)

DESCRIPTION ^

 Update spatial pattern

 --- Syntax
 job_edit_act_update_spatialpattern(inst_id)

 --- History
 ????-??-?? Taku Yoshioka
 2008-09-04 Taku Yoshioka
 2009-05-22 Taku Yoshioka
  Modify display of standard brain coordinates

 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_edit_act_update_spatialpattern(inst_id)
0002 % Update spatial pattern
0003 %
0004 % --- Syntax
0005 % job_edit_act_update_spatialpattern(inst_id)
0006 %
0007 % --- History
0008 % ????-??-?? Taku Yoshioka
0009 % 2008-09-04 Taku Yoshioka
0010 % 2009-05-22 Taku Yoshioka
0011 %  Modify display of standard brain coordinates
0012 %
0013 % Copyright (C) 2011, ATR All Rights Reserved.
0014 % License : New BSD License(see VBMEG_LICENSE.txt)
0015 
0016 global vbmeg_inst; 
0017 if isempty(vbmeg_inst.editact{inst_id}.V), return; end
0018 
0019 %
0020 % Global variables
0021 %
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 h_fig = vbmeg_inst.editact{inst_id}.h_fig; 
0024 h_space = vbmeg_inst.editact{inst_id}.h_space;
0025 h_cbar = vbmeg_inst.editact{inst_id}.h_cbar;
0026 V = vbmeg_inst.editact{inst_id}.V;
0027 F = vbmeg_inst.editact{inst_id}.F;
0028 plot_parm = vbmeg_inst.editact{inst_id}.plot_parm;
0029 ix = vbmeg_inst.editact{inst_id}.ix;
0030 ed4 = vbmeg_inst.editact{inst_id}.ed4;
0031 ed6 = vbmeg_inst.editact{inst_id}.ed6;
0032 cb1 = vbmeg_inst.editact{inst_id}.cb1;
0033 cb2 = vbmeg_inst.editact{inst_id}.cb2;
0034 Vtal = vbmeg_inst.editact{inst_id}.Vtal;
0035 model_type_fold_rb = vbmeg_inst.editact{inst_id}.model_type_fold_rb;
0036 model_type_inflate_rb = ...
0037     vbmeg_inst.editact{inst_id}.model_type_inflate_rb;
0038 xxP = vbmeg_inst.editact{inst_id}.xxP;
0039 if ~isempty(xxP), xxP = xxP{1}; end
0040 
0041 %
0042 % Preparation for cortical surface plot
0043 %
0044 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0045 set(h_fig,'Pointer','arrow');
0046 drawnow;
0047 
0048 % Original/Inflated model
0049 if get(model_type_fold_rb,'Value')==1,  
0050   V = vbmeg_inst.editact{inst_id}.V;
0051   inf_C = [];
0052 else
0053   V = vbmeg_inst.editact{inst_id}.Vinf;
0054   inf_C = vbmeg_inst.editact{inst_id}.inf_C;
0055 end
0056 
0057 % Get display parameters
0058 LRflag = [];
0059 if get(cb1,'Value')==get(cb1,'Max'), LRflag = 'L'; end
0060 if get(cb2,'Value')==get(cb2,'Max'), LRflag = [LRflag 'R']; end
0061 plot_parm.LRflag = LRflag;
0062 
0063 if isempty(xxP), isact = 0; else isact = 1; end
0064 plot_parm.isact = isact;
0065 
0066 %
0067 % Plot brain activities superimposed on the cortical surface model
0068 %
0069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0070 set(h_fig,'CurrentAxes',h_space);
0071 cla; 
0072 job_edit_act_plotbrain(plot_parm,V,F,inf_C,xxP,min(xxP),max(xxP));
0073 v = caxis;
0074 set(ed6,'String',['[' num2str(v) ']']);
0075 axis tight;
0076 axis equal;
0077 set(h_space,'Box','on','XTick',[],'YTick',[],'ZTick',[]);
0078 reset(h_cbar);
0079 colorbar(h_cbar);
0080 
0081 % Selected vertex
0082 if ix~=0, 
0083   hold on;
0084   h = plot3(V(ix,1),V(ix,2),V(ix,3),'gx');
0085   set(h,'MarkerSize',plot_parm.ms,'EraseMode','xor',...
0086     'LineWidth',plot_parm.lw);
0087 
0088   % Update talairach coordinates
0089   job_edit_act_update_talcoord(inst_id);
0090   %str = ['(' num2str(ceil(Vtal(ix,1))) ',' ...
0091   %       num2str(ceil(Vtal(ix,2))) ',' ...
0092   %       num2str(ceil(Vtal(ix,3))) ')'];
0093   %set(ed4,'String',str);
0094 end

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