Main Content

images.roi.RectangleMovingEventData class

Package:images.roi

Event data passed when rectangle ROI is moving

Description

Theimages.roi.RectangleMovingEventDataclass is the class passed to listeners when aRectangleROI is moving. When the ROI class triggers an event using thenotifyhandle class method, MATLAB®assigns values to the properties of animages.roi.RectangleMovingEventDataobject and passes that object to the listener callback function (the event handler).

Theimages.roi.RectangleMovingEventDataclass is ahandleclass.

Class Attributes

ConstructOnLoad
true
HandleCompatible
true

For information on class attributes, seeClass Attributes.

Creation

Thenotifyhandle class method creates animages.roi.RectangleMovingEventDataobject when called to trigger an event.images.roi.RectangleMovingEventData不接受输入参数。

Properties

expand all

Event source, specified as a handle to the object that triggered the event.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Name of the event, specified as a character vector.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Position before ROI moved, specified as a two-element numeric vector of the form[m n].

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Position after ROI moved, specified as a two-element numeric vector of the form[m n].

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Orientation before ROI moved, specified as a numeric scalar, measured in degrees.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Orientation after ROI moved, specified as a numeric scalar, measured in degrees.

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Examples

collapse all

This callback function gets the event source object handle, the event name, and other properties from theimages.roi.RectangleMovingEventDataobject passed to it when the event is triggered.

functionmyCallbk(s,evtData) eventSource = evtData.Source; eventName = evtData.EventName; previousCenter = evtData.PreviousCenter; currentCenter = evtData.CurrentCenter; previousRotationAngle = evtData.PreviousRotationAngle; currentRotationAngle = evtData.CurrentRotationAngle;end

H版istory

Introduced in R2018b