Starting in R2018b, a new set of ROI objects replaces the existing set of ROI objects. The new objects provide more functional capabilities, such as face color transparency. The new classes also support events that you can use to respond to changes in your ROI such as moving or being clicked. Although there are no plans to remove the old ROI objects at this time, switch to the new ROIs to take advantage of the additional capabilities and flexibility. For more information on creating ROIs using the new ROI functions, see ROI Creation Overview.
To specify a label for a point ROI, assign a value to the Label
property of the ROI. Use the LabelVisible
property to control the
visibility of the label.
Update CodeUpdate all instances of setString
method.
Discouraged Usage | Recommended Replacement |
---|
This example specifies a label for the point ROI using
the setString
method. | Create a point ROI using the new ROI objects and
replace use of the getString method with
setting the value of the Label property
of the ROI. You can control the visibility of the label
using the LabelVisible property. All the
new ROI objects support a Label
property. |