Circle
Circular region of interest
Description
A Circle
object specifies the size and position of a circular
region-of-interest (ROI). You can customize the appearance and interactive behavior of the
ROI.
For more information about using this ROI, including keyboard shortcuts, see Tips.
Creation
There are two ways to create a Circle
object. For more information, see
Create ROI Shapes.
Use the
drawcircle
function. Use this function when you want to create the ROI and set the appearance in a single command. You can specify the size and position of the ROI interactively by drawing the ROI over an image using the mouse, or programmatically by using name-value arguments.Use the
images.roi.Circle
function described here. Use this function when you want to specify the appearance and behavior of the ROI before you specify the size and position of the ROI. After creating the object, you can specify the size and position interactively by using thedraw
function or programmatically by modifying properties of the object.
Description
creates a
roi
= images.roi.CircleCircle
object with default properties.
creates the ROI on the axes specified by roi
= images.roi.Circle(ax
)ax
.
sets writeable properties of the
ROI using name-value arguments. You can specify multiple name-value arguments.roi
= images.roi.Circle(___,Name=Value
)
Example: images.roi.Circle(Color="y")
creates a yellow colored
Circle
object.
Input Arguments
Properties
Object Functions
addlistener | Create event listener bound to event source |
beginDrawingFromPoint | Begin drawing ROI from specified point |
bringToFront | Bring ROI to front of Axes stacking order |
createMask | Create binary mask image from ROI |
draw | Begin drawing ROI interactively |
inROI | Query if points are located in ROI |
wait | Block MATLAB command line until ROI operation is finished |
Examples
More About
Tips
To draw the ROI interactively using the
draw
ordrawcircle
function, position the cursor on the axes and click and drag to create the shape. To finish drawing, release the pointer.The ROI supports the following interactivity, including keyboard shortcuts.
Behavior Keyboard shortcut Finish drawing the ROI. Release the mouse cursor.
Cancel drawing the ROI. Press Esc. The function returns a valid ROI object with an empty Position
property.Resize (reshape) the ROI. Position pointer over a vertex and then click and drag.
Move the ROI. Position the cursor anywhere inside the ROI, press and hold the mouse, and move the ROI over the image. Delete the ROI. Position the cursor on the circle, right-click, and select Delete Circle from the context menu. You can also delete the ROI programmatically using the delete
function.For information about using an ROI in an app created with App Designer, see Using ROIs in Apps Created with App Designer.