필터 지우기
필터 지우기

Update image in axes (GUI) after imfreehand

조회 수: 1 (최근 30일)
Lluis Roca
Lluis Roca 2013년 10월 14일
댓글: Image Analyst 2013년 10월 15일
Hi,
I have an open imfreehand pushbutton that shows the current image in an axes (within a GUI)
As I add some graphics using the imfreehand, how can I update the image in the axes after closing the imfreehand (after hitting the X, it does not have exit in the File menu)?
Code:
function freeHandButton_Callback(hObject, eventdata, handles)
% hObject handle to freeHandButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I = getappdata(handles.imageAxes , 'yourVariable');
figure, imshow(I);
Thanks

답변 (1개)

Image Analyst
Image Analyst 2013년 10월 14일
I'm not sure what you mean by update. You can call drawnow if you want, or call plot() to plot the coordinates that you drew over the image.
  댓글 수: 4
Lluis Roca
Lluis Roca 2013년 10월 15일
Yep, you were right. I mean how to update the image in the axes figure after calling figure and adding graphics (e.g., lines, arrows).
Thanks
Image Analyst
Image Analyst 2013년 10월 15일
If it blew them away, you will probably have to redraw them. Or maybe there's some way to protect them with the hittest property - I don't know. Maybe call tech support and ask.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by