This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

removeNewPositionCallback

Remove new-position callback from ROI object

removeNewPositionCallback is not recommended. Use one of the ROI classes instead, described in ROI Creation Overview.

Syntax

removeNewPositionCallback(h,id)

Description

example

removeNewPositionCallback(h,id) removes the corresponding function from the new-position callback list of the ROI object, h.

Examples

Add and Remove New Position Callback

Create a line ROI object. Display the position of the line in the title. Use addNewPositionCallback to update the title each time you move the line.

imshow('pout.tif')
h = imline(gca,[10 100],[100 100]);
id = addNewPositionCallback(h,@(pos) title(mat2str(pos,3)));

Move the line to observe the callback behavior.

After observing the callback behavior, remove the callback. The title no longer changes when you move the line.

removeNewPositionCallback(h,id);

Input Arguments

collapse all

ROI object, specified as an imellipse, imline, impoint, impoly, or imrect object.

Identifier of new-position callback function, specified as a struct.

Introduced in R2008a