diff options
author | Mi Zhang <mzhang@email.wm.edu> | 2012-09-13 16:34:24 -0400 |
---|---|---|
committer | Mi Zhang <mzhang@email.wm.edu> | 2012-09-13 16:34:24 -0400 |
commit | ae7f69346a37dd19c14b14ef2a2a3c8583f64a8c (patch) | |
tree | 362856076c0f04946d87811c9152cf50cc5008c6 | |
parent | 035bd8bad8883198aa101bbe4c4b3410eb7794f0 (diff) | |
download | beam_profiler-ae7f69346a37dd19c14b14ef2a2a3c8583f64a8c.tar.gz beam_profiler-ae7f69346a37dd19c14b14ef2a2a3c8583f64a8c.zip |
draw crosssections
-rw-r--r-- | gui_win.m | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -803,8 +803,11 @@ function checkbox2_Callback(hObject, eventdata, handles) global image_display; global image_cross; global image_negative; +global image_original; [sizey sizex] = size(image_display); image_cross=image_display; + + if get(handles.checkbox2,'Value') if image_display == 0 set(handles.checkbox2,'Value',0) @@ -814,6 +817,21 @@ if get(handles.checkbox2,'Value') y0=round(y0); max2 = max(image_display(:)); + % Here we draw crossections + hold off; + axes(handles.ysection); + h = plot(image_display(:,x0)); + hold on; + set(h,'Color','red','LineWidth',2); + + + hold off; + axes(handles.xsection); + h = plot(image_display(y0,:)); + set(h,'Color','red','LineWidth',2); + + + %draw cross on the image for y=1:sizey image_cross(y,x0) = max(max2,image_display(y,x0)); @@ -831,6 +849,9 @@ else display_stuff(handles); end; + + + % Hint: get(hObject,'Value') returns toggle state of checkbox2 |