Main Content

images.roi.ROIMovingEventData class

Package: images.roi

Event data passed when ROI is moving

Description

The images.roi.ROIMovingEventData class is the class passed to listeners when a region-of-interest (ROI) is moving. When the ROI class triggers an event using the notify handle class method, MATLAB® assigns values to the properties of an images.roi.ROIMovingEventData object and passes that object to the listener callback function (the event handler).

The images.roi.ROIMovingEventData class is a handle class.

Class Attributes

ConstructOnLoad
true
HandleCompatible
true

For information on class attributes, see Class Attributes.

Creation

The notify handle class method creates an images.roi.ROIMovingEventData object when called to trigger an event. images.roi.ROIMovingEventData does not accept input arguments. Subclasses of event.EventData cannot pass arguments to the superclass constructor.

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

Data Types: char

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

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

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

Attributes:

GetAccess
public
SetAccess
private
GetObservable
true
SetObservable
true

Data Types: char

Examples

collapse all

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

function myCallbk(s,evtData)
   eventSource = evtData.Source;
   eventName = evtData.EventName;
   previousPosition = evtData.PreviousPosition;
   currentPosition = evtData.CurrentPosition; 
end

Version History

Introduced in R2018b