Update image in axes (GUI) after imfreehand
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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 个评论
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 Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!