Domanda

Just wondering how I can get rid of the imellipse after calling it in MATLAB. Currently I call it, double click it to plot the ellipse on my image, then I want to remove the ellipse tool.

I have a GUI, which I click a pushbutton to make an imellipse. After double clicking the imellipse, an outline is plotted onto my image and the dimensions saved to some matrix.

After double clicking it, resulting in a plot onto my image, I would like the ellipse ring (created from the function) to disappear. It just seems to stick around on the image (is this normal, or should it disappear?).

I can include my code, it just seems irrelevant to the problem (remove imellipse after double clicking).

I hope this is more clear!

Thanks!

È stato utile?

Soluzione

imellipse creates a ROI on the figure, which can be removed if you delete the associated ROI object.

Let's suppose you have used imellipse like this -

Lesion = imellipse(handles.axes1);

Then, get all the information that you need from Lesion and then delete it. For example, if you need the mask information from it, store it somewhere.

LesionMask = Lesion.createMask();

Now, delete the ROI object which is Lesion.

delete(Lesion); %// Deletes the ROI related to imellipse

Read more about how to handle ROIs at Region-of-interest (ROI) base class Documentation

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top