ROIPOLY Issue with GUI help??

1 次查看(过去 30 天)
Ellis Berry
Ellis Berry 2016-6-7
Hi everyone,
Thanks to Geoff hayes help, I now have this code under my pushbutton4 function in a GUI:
% --- Executes on button press in pushbutton4. Choose Crop area
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
filename = uigetfile('*.*');
myimage = imread(filename);
[BW, xi, yi] = roipoly(myimage);
handles.xMin = min(xi);
handles.xMax = max(xi);
handles.yMin = min(yi);
handles.yMax = max(yi);
guidata(hObject, handles);
However, when I click this button, the ROIPOLY function starts but the picture opens in the GUI, actually behind al the pushbutton animations! How do I get the ROIPOLY editing figure to open as a separate figure? When I use ROIPOLY in a normal script it works fine opening in its own window allowing you to zoom in and out as desired. How do I do this in a GUI?
Many thanks,
Ellis

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by