Event data passed when the ellipse ROI is moving
images.roi.EllipseMovingEventData class is the class passed to
listeners when an Ellipse 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.EllipseMovingEventData object and passes that object to the
listener callback function (the event handler).
images.roi.EllipseMovingEventData class is a
For information on class attributes, see Class Attributes.
notify handle class method creates an
images.roi.EllipseMovingEventData object when called to trigger an event.
images.roi.EllipseMovingEventData accepts no input arguments.
Source— Event source
Event source, specified as a handle to the object that triggered the event.
EventName— Name of event
Name of event, specified as a character vector.
PreviousCenter— Position before ROI moved
Position before ROI moved, specified as a two-element numeric vector of the form
CurrentCenter— Position after ROI moved
Position after ROI moved, specified as a two-element numeric vector of the form
PreviousSemiAxes— Lengths of semiaxes before ROI was reshaped
Lengths of semiaxes before ROI was reshaped, specified as a two-element numeric vector.
CurrentSemiAxes— Lengths of semiaxes after ROI was reshaped
Lengths of semiaxes after ROI was reshaped, specified as a two-element numeric vector.
PreviousRotationAngle— Orientation of ROI before rotation
Orientation of ROI before rotation, specified as a numeric scalar, measured in degrees.
CurrentRotationAngle— Orientation of ROI after rotation
Position after ROI moved, specified as a numeric scalar, measured in degrees.
This callback function gets the event source object handle and the
event name and other properties from the
images.roi.EllipseMovingEventData object passed to it when the event
function myCallbk(s,evtData) eventSource = evtData.Source; eventName = evtData.EventName; previousCenter = evtData.PreviousCenter; currentCenter = evtData.CurrentCenter; previousSemiAxes = evtData.PreviousRadius; currentSemiAxes = evtData.CurrentRadius; previousRotationAngle = evtData.PreviousRotationAngle; currentRotationAngle = evtData.CurrentRotationAngle; end