How can I change the figure in which I'm drawing with imfreehand?
1 次查看(过去 30 天)
显示 更早的评论
I segment an image after specifying some segmentation seeds via imfreehand, then I get the segmented image on a new figure and I want to redraw some seeds on this new figure. How can I make the new calls to imfreehand be directed to the new figure and not the previous one?
0 个评论
采纳的回答
更多回答(2 个)
Jan
2013-7-10
The documentation of imfreehand reveals, that the handle of axes to operate in can be specified as first input.
Image Analyst
2013-7-10
Let's say that you're using GUIDE and you have two "axes" controls on your GUI called axes1 and axes2 - this means that the "tag" property for those controls is axes1 and axes2. Then before you call imfreehand, simply call axes to switch focus (switch the gca which is the current axes):
axes(handles.axes2);
handleToDrawing = imfreehand();
Or pass it in
handleToDrawing = imfreehand(handles.axes2);
2 个评论
Image Analyst
2013-7-10
Replace handles.axes2 with whatever the handle to your axes is - the one you got from uicontrol() when you called that.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!