Elliptical region of interest
Ellipse
is an elliptical region-of-interest (ROI)
object.
To draw the ROI, position the cursor on the axes and click and drag to create the shape. To finish the ROI, release the mouse button. For more information about using this ROI, including keyboard shortcuts, see Tips.
To draw a circular ROI, use the Circle
object.
To create an Ellipse
object, use the
images.roi.Ellipse
creation function. After creating the object, call
the draw
object
function to begin drawing. As a convenience, you can also use the drawellipse
function to create an Ellipse
ROI. The drawellipse
function creates the ROI object and calls the draw
object
function for you.
creates an instance
of the roi
= images.roi.Ellipse images.roi.Ellipse
class with default properties.
creates the ROI on the axes specified by roi
= images.roi.Ellipse(ax
)ax
.
sets properties using
name-value pairs. For example, roi
= images.roi.Ellipse(___,Name,Value
)images.roi.Ellipse('Color','y')
sets the
color of the Ellipse
object to yellow. You can specify multiple
name-value pairs. Enclose each property name in single quotes.
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 |
The ROI supports the following interactivity, including keyboard shortcuts.
Behavior | Keyboard shortcut |
---|---|
Cancel drawing the ROI. | Press Esc. The function returns a valid ROI object with an
empty Position field. |
Fine-tune width of ellipse as you are drawing. | As you draw the ellipse, use the scroll wheel to make small changes to the width of the ellipse. |
Rotate the ROI. | Position the pointer near a vertex. The pointer changes to the rotate pointer. Click and rotate the ROI on its center. To make the rotation snap at 15 degree angles, press Shift as you rotate. |
Maintain aspect ratio while drawing. | Hold the Shift key as you draw. Creates a circular ROI. To lock the aspect ratio, position the pointer on the ROI, right-click, and select Fix Aspect Ratio from the context menu |
Resize (reshape) the ROI. | Position pointer over a vertex and then click and drag. To main the aspect ratio as you resize, hold the Shift key. |
Move the ROI. | Position the pointer over the ROI. The pointer changes to the fleur shape. Click and drag to move the ROI. |
Delete the ROI. | Position the pointer anywhere in the ROI and right-click. Select Delete
Ellipse from the context menu. You can also delete the ROI
programmatically using the delete object function. |
For information about using an ROI in an app created with App Designer, see Using ROIs in Apps Created with App Designer.
AssistedFreehand
| Circle
| Crosshair
| Cuboid
| drawellipse
| Freehand
| Line
| Point
| Polygon
| Polyline
| Rectangle