0001 function emphasize_electrode_text(elecs);
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 if (nargin>=1) && ischar(elecs) && strcmp(elecs,'UNIT_TEST'); do_unit_test; return; end
0013
0014 hh = get(gca,'Children'); axis vis3d
0015
0016 bgcolour = [1,1,1];
0017
0018
0019 tmp = view;
0020 dirn = tmp(1:3,3); dirn = dirn'/norm(dirn);
0021
0022 if nargin==0;
0023 elecs= 1:length(hh)';
0024 end
0025
0026 k=0;for hi = hh(:)'; k=k+1;
0027 if ~strcmp(get(hi,'Type'),'text');
0028 continue;
0029 end
0030 if ~any(str2num(get(hi,'String'))==elecs);
0031 continue;
0032 end
0033 set(hi, 'BackgroundColor', bgcolour);
0034 set(hi, 'FontSize', 12);
0035 pn = get(hi, 'Position');
0036 set(hi, 'Position', pn + dirn*10);
0037 end
0038
0039 function do_unit_test
0040 fmdl = getfield(mk_common_model('n3r2',[16,2]),'fwd_model');
0041 subplot(221);
0042 show_fem(fmdl,[0,1]); view(0,0);
0043 emphasize_electrode_text();
0044 subplot(222);
0045 show_fem(fmdl,[0,1]); view(0,80);
0046 emphasize_electrode_text();
0047 subplot(223);
0048 show_fem(fmdl,[0,1]); view(50,80);
0049 emphasize_electrode_text();