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 Create ROI Shapes.
To create a binary mask image using the new ROIs, use the createMask
object function associated with the new ROIs.
Update CodeUpdate all instances of createMask
.
Discouraged Usage | Recommended Replacement |
---|
This example uses the createMask
method to create a binary mask image from an
ROI. | Here is equivalent code, creating a binary mask image
using one of the new ROI objects. Call the
createMask object function associated
with the new ROIs as you did with the previous ROIs.
|