0001 function txt=SurfStatDataCursorQ(empt,event_obj) 0002 pos=get(event_obj,'Position'); 0003 h=get(event_obj,'Target'); 0004 v=get(h,'Vertices'); 0005 x=get(h,'FaceVertexCData'); 0006 id1=min(find(v(:,1)==pos(1)&v(:,2)==pos(2)&v(:,3)==pos(3))); 0007 tag=get(get(h,'Parent'),'Tag'); 0008 [s,a,id0]=strread(tag,'%s %d %d'); 0009 id=id1+id0 0010 c=get(get(h,'parent'),'CLim'); 0011 thresh=c(2)/255; 0012 tt=x(id1)/thresh; 0013 rtt=round(tt); 0014 if rtt<=1 0015 p=NaN; 0016 else 0017 p=(255-tt)/253*thresh; 0018 end 0019 txt = {['x: ',num2str(pos(1))],... 0020 ['y: ',num2str(pos(2))],... 0021 ['z: ',num2str(pos(3))],... 0022 ['id: ',num2str(id)],... 0023 ['Q: ',num2str(p)]}; 0024 return 0025 end 0026