diff options
-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 |