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 = [0,0,1,0]*tmp;
0021 dirn = dirn(1:3);
0022 dirn = -dirn(:)'/norm(dirn);
0023
0024 if nargin==0;
0025 elecs= 1:length(hh)';
0026 end
0027
0028 k=0;for hi = hh(:)'; k=k+1;
0029 if ~strcmp(get(hi,'Type'),'text');
0030 continue;
0031 end
0032 if ~any(str2num(get(hi,'String'))==elecs);
0033 continue;
0034 end
0035 set(hi, 'BackgroundColor', bgcolour);
0036 set(hi, 'FontSize', 12);
0037 pn = get(hi, 'Position');
0038 set(hi, 'Position', pn + dirn*1 );
0039 end
0040
0041 function do_unit_test
0042 fmdl = getfield(mk_common_model('n3r2',[16,2]),'fwd_model');
0043 subplot(221);
0044 show_fem(fmdl,[0,1]); view(0,0); drawnow
0045
0046 emphasize_electrode_text();
0047 subplot(222);
0048 show_fem(fmdl,[0,1]); view(0,80); drawnow
0049
0050 emphasize_electrode_text();
0051 subplot(223);
0052 show_fem(fmdl,[0,1]); view(50,80); drawnow
0053
0054 emphasize_electrode_text();