Home > functions > job > job_plot_currentmap_dir > job_plot_cmap_change_talcoord.m

job_plot_cmap_change_talcoord

PURPOSE ^

Change standard brain coordinate

SYNOPSIS ^

function job_plot_cmap_change_talcoord(inst_id)

DESCRIPTION ^

 Change standard brain coordinate

 --- History
 2008-10-03 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_change_talcoord(inst_id)
0002 % Change standard brain coordinate
0003 %
0004 % --- History
0005 % 2008-10-03 Taku Yoshioka
0006 %
0007 % Copyright (C) 2011, ATR All Rights Reserved.
0008 % License : New BSD License(see VBMEG_LICENSE.txt)
0009 
0010 global vbmeg_inst; 
0011 
0012 %
0013 % Global variables
0014 %
0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0016 ix_peak = vbmeg_inst.plotcmap{inst_id}.ix_peak;
0017 rb1 = vbmeg_inst.plotcmap{inst_id}.rb1;
0018 rb2 = vbmeg_inst.plotcmap{inst_id}.rb2;
0019 ed4 = vbmeg_inst.plotcmap{inst_id}.ed4;
0020 ed6 = vbmeg_inst.plotcmap{inst_id}.ed6;
0021 
0022 %
0023 % Update standard brain coordinate
0024 %
0025 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0026 v = str2num(get(ed6,'String'));
0027 if length(v)~=3, 
0028   warndlg(['Coordinate values must be appropriate format \n' ...
0029            '(e.g., ''10, 20, 30'')'],'Warning');
0030   job_plot_cmap_update_talcoord(inst_id);
0031   return;
0032 end
0033 
0034 if get(rb1,'Value')==get(rb1,'Max'), 
0035   Vstd = vbmeg_inst.plotcmap{inst_id}.Vtal;
0036 else
0037   Vstd = vbmeg_inst.plotcmap{inst_id}.Vmni;
0038 end
0039 
0040 % Find nearest vertex
0041 d = repmat(v,[size(Vstd,1) 1])-Vstd;
0042 d = sum(d.^2,2);
0043 [tmp,vbmeg_inst.plotcmap{inst_id}.ix_peak] = min(d);
0044 
0045 %
0046 % Update figure
0047 %
0048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0049 job_plot_cmap_update_timecourse(inst_id); 
0050 job_plot_cmap_update_spatialpattern(inst_id);

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