0001 function plot_ch_label(parm,facefile,show_label,dx)
0002
0003
0004
0005
0006 load([facefile],'Vspm','xx')
0007
0008 Rmax = 0.006;
0009
0010
0011
0012 [indx, dd] = vb_find_nearest_point(Vspm, parm.src_pos , Rmax, 100, 1);
0013 sxx = dx * xx(indx,:);
0014
0015 [indx, dd] = vb_find_nearest_point(Vspm, parm.det_pos , Rmax, 100, 1);
0016 dxx = dx * xx(indx,:);
0017
0018
0019 for n=1:length(parm.source)
0020 ix = strmatch(parm.source{n}, show_label, 'exact');
0021 if ~isempty(ix)
0022 text(parm.src_pos(n,1)+sxx(n,1), parm.src_pos(n,2)+sxx(n,2), ...
0023 parm.src_pos(n,3)+sxx(n,3), parm.source{n});
0024 end
0025 end
0026
0027 for n=1:length(parm.detector)
0028 ix = strmatch(parm.detector{n}, show_label, 'exact');
0029 if ~isempty(ix)
0030 text(parm.det_pos(n,1)+dxx(n,1), parm.det_pos(n,2)+dxx(n,2), ...
0031 parm.det_pos(n,3)+dxx(n,3), parm.detector{n});
0032 end
0033 end