summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMi Zhang <mzhang@email.wm.edu>2012-09-13 16:34:24 -0400
committerMi Zhang <mzhang@email.wm.edu>2012-09-13 16:34:24 -0400
commitae7f69346a37dd19c14b14ef2a2a3c8583f64a8c (patch)
tree362856076c0f04946d87811c9152cf50cc5008c6
parent035bd8bad8883198aa101bbe4c4b3410eb7794f0 (diff)
downloadbeam_profiler-ae7f69346a37dd19c14b14ef2a2a3c8583f64a8c.tar.gz
beam_profiler-ae7f69346a37dd19c14b14ef2a2a3c8583f64a8c.zip
draw crosssections
-rw-r--r--gui_win.m21
1 files changed, 21 insertions, 0 deletions
diff --git a/gui_win.m b/gui_win.m
index 7f99f0e..d599f41 100644
--- a/gui_win.m
+++ b/gui_win.m
@@ -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