Event data passed when ROI is clicked
images.roi.ROIClickedEventData class is the class passed to
listeners when a region-of-interest (ROI) is clicked. When the ROI class triggers an event
notify handle class method, MATLAB® assigns values to the properties of an
images.roi.ROIClickedEventData object and passes that object to the
listener callback function (the event handler).
images.roi.ROIClickedEventData class is a
For information on class attributes, see Class Attributes.
notify handle class method creates an
images.roi.ROIClickedEventData object when called to trigger an event.
images.roi.ROIClickedEventData does not accept input arguments.
Source— Event source
Event source object, specified as a handle to the object that triggered the event.
EventName— Name of event
Name of the event, specified as a character vector.
SelectionType— Type of selection
Type of selection, specified as one of the following character vectors.
SelectedPart— Part of ROI that was clicked
Part of the ROI that was clicked, specified as one of the character vectors in this table.
|Clicked edge of ROI.|
|Clicked face of ROI.|
|Clicked ROI label.|
|Clicked marker used to reshape the ROI.|
CurrentSelected— ROI is currently selected
ROI is currently selected, specified as a logical scalar. Returns
1 when the ROI is selected, otherwise,
deselect an ROI, use Ctrl-click.
PreviousSelected— ROI was previously selected
ROI was previously selected, specified as a logical scalar. Returns
1 when the ROI was already selected and
the ROI was not previously selected.
This callback function gets the event source object handle, the event
name, and other properties from the
object passed to it when the event is triggered.
function myCallbk(s,evtData) eventSource = evtData.Source; eventName = evtData.EventName; selectionType = evtData.SelectionType; selectedPart = evtData.SelectedPart; currselected = evtData.CurrentSelected; prevselected = evtData.PreviousSelected; end