Circle
R2026bDescription
A Circle object labels an interactive circle in a
Viewer object. The properties of the object control the appearance and
behavior of the circle annotation.
Interactive viewer-based ROIs enable you to draw, edit, and
measure regions of interest on images and volumes displayed using imageshow
and volshow. Interactive ROIs support dragging, resizing, event callbacks,
and measurement labels. Use interactive viewer-based ROIs to manually annotate an image, build
annotation workflows in apps, or respond to user interactions with ROI shapes. For a comparison
of interactive viewer-based ROIs with other ROIs, see Choose Approach to Annotate ROIs in Images.
![]()
Creation
You can create a Circle object in these ways. For more information, see
Create Interactive Viewer-Based ROIs.
Interactively draw a circle in a 2-D
Viewerobject. From the viewer toolbar, select the draw annotations icon
, then select the draw circle icon
. Click to place a point on the perimeter of the
circle, drag to the opposite point on the perimeter of the circle, and release. To
export the ROI to the workspace as a Circleobject, right-click the edge of the circle and select Export annotation to workspace.Use the
uidrawfunction to interactively draw the ROI in a specified viewer and create the ROI object.Use the
images.ui.graphics.roi.Circlefunction described here. After you create the ROI, you can display it by adding the object to theAnnotationsproperty of aViewerobject.
Description
c = images.ui.graphics.roi.Circle creates a
Circle object with default property values. Use
c to query and modify properties of the
Circle object after you create it.
c = images.ui.graphics.roi.Circle(Name=Value) sets one or more
writable properties using
name-value arguments.
Example:
images.ui.graphics.roi.Circle(Position=[10 20 5]) creates a
Circle object with a radius of 5 pixels whose center is at the
xyz-coordinates (10, 20, 1).
Properties
Object Functions
createMask | Create binary mask image from ROI |
Examples
Tips
The ROI supports this interactivity, including keyboard shortcuts.
Behavior Interaction Add annotation From the viewer toolbar, select the draw annotations icon
, then select the draw circle icon
. To draw the circle, click to place
a point on the perimeter of the circle, drag to the opposite point on
the perimeter, and release. To adjust the center, hold
Ctrl while you drag.Resize annotation To change the radius of the circle, drag the edge of the ROI.
Move annotation Hold Ctrl and drag the ROI. Edit annotation label Right-click the edge of the ROI. From the context menu, select Edit label. When the label text highlights, type new text for the label. To finish editing, click outside the label. Remove annotation Right-click the edge of the ROI and choose Remove annotation from the context menu. Select Remove all annotations to remove all annotations in the viewer.
Version History
Introduced in R2026a
