imellipse -- "Operation terminated by user" error

I've been having strange problems with imellipse. I'm trying to run it in a loop to draw multiple ROIs but it either breaks out of the loop (with no error message), or gives me the following error, which makes little sense to me.
Operation terminated by user during uiwait (line 82)
In imroi>manageROIWaitMode (line 391)
uiwait(h_fig);
In imroi/wait (line 226)
accepted_pos = manageROIWaitMode(obj);
In imellipse/wait (line 118)
pos = wait@imroi(obj);
I distilled my code down to a very simple program, which still has this error (or does not complete the loops):
clc; close all
figure, imshow('pout.tif');
reps = 10;
positions = cell(1,reps);
for i = 1:reps
disp(i)
h = imellipse;
positions{i} = wait(h);
pause(0.5)
end
Appreciate your help.

4 commentaires

Gerald
Gerald le 11 Oct 2013
I've tried this same code on 3 different machines (2012a, 2011b, 2011b), and it works on none of them. The strange thing is that this is not new code -- my imellipse code used to work, but then this problem mysteriously appeared.
Anand
Anand le 11 Oct 2013
Modifié(e) : Anand le 11 Oct 2013
I tried this code in 13a. When the image appears, I drag an ellipse and when I'm done I double-click on the ellipse so that I can create another ellipse.
I didn't run into any errors.
Please clarify your workflow.
Gerald
Gerald le 11 Oct 2013
Hi Anand, Thanks for your prompt response. I don't know what you mean by "clarify your workflow." On all of my computers, I start up MATLAB, run this code, and try draw ellipses as you did (and double-clicking on them). However, for me, it always just breaks out of the loop or causes an error after the first ellipse.
Do you have any ideas as to what may cause this?
Image Analyst
Image Analyst le 11 Oct 2013
Gerald, did you double-click inside the ellipse, or right click and say "Create mask"? What exactly did you do to "finish off" the ellipse and move on to the next one?

Connectez-vous pour commenter.

 Réponse acceptée

Gerald
Gerald le 11 Oct 2013

0 votes

I think I found the culprit -- I recently installed a third-party application (which looks for mouse behavior in the background) that may have been responsible.

1 commentaire

Xiaolong
Xiaolong le 23 Déc 2013
the same problem I met. What's the name of this * third-party application *

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Programming dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by