Hi,
I wrote a function that draws regions on an image, now I'm really stuck on creating a loop out of the message box that appears, asking if the user wants to draw another one, redo the previous or stop drawing.
Here is the basic framework of the relevant bit:
I don't think it can go back to the first while 'Yes' after the 'Redo Prev' while. Is there a better way to do this?i=1
%insert function stuff
button=questdlg('Add region?',...
'Add',...
'Yes','Redo prev','No','Yes');
while strcmp(button,'Yes')i=i+1end
%stuff
button=questdlg('Add region?',...
'Add',...
'Yes','Redo prev','No','Yes');
while strcmp(button,'Redo prev')
%stuff, overwrites current iend
button=questdlg('Add region?',...
'Add',...
'Yes','Redo prev','No','Yes');
while strcmp(button,'No')%stopsend
Thanks for reading...and any pointers at all would be a great help..


LinkBack URL
About LinkBacks