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