Circle
Description
A Circle object labels a circle in a Viewer
object. The properties of the object control the appearance and behavior of the circle
annotation.
Viewer-based ROIs provide high-performance interactions with images and volumes you
display in a Viewer object using imageshow and
volshow, respectively. To draw a circle on an
imshow image display, use drawcircle
instead.
![]()
Creation
You can create a Circle object in these ways:
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
uidrawandimages.ui.graphics.roi.Circlefunctions create ROIs to display in aViewerobject. Viewer-based ROIs provide high-performance interactions with images and volumes you display in aViewerobject usingimageshowandvolshow, respectively. To draw a circle on animshowimage display, usedrawcircleinstead.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
