Assisted freehand region of interest
AssistedFreehand
is an hand-drawn region-of-interest (ROI) object, where
the line drawn automatically follows edges in the underlying image.
To draw the ROI, position the pointer on the image, click and release to place the first vertex (waypoint). Then move the pointer to draw a line. As you draw, the line automatically follows the edges of objects in the image. Double-click to finish the ROI. For more information about using this ROI, including keyboard shortcuts, see Tips.
To create an AssistedFreehand
object, use the
images.roi.AssistedFreehand
creation function. After creating the
object, call the draw
object
function to begin drawing. As a convenience, you can also use the drawassisted
function to create an AssistedFreehand
ROI. The drawassisted
function creates the ROI object and calls the draw
object
function for you.
creates an
roi
= images.roi.AssistedFreehandAssistedFreehand
object with default properties.
creates the ROI on the axes specified by roi
= images.roi.AssistedFreehand(ax
)ax
.
sets properties using name-value pairs. For example,
roi
= images.roi.AssistedFreehand(___,Name,Value
)images.roi.AssistedFreehand('Color','y')
sets the color of
AssistedFreehand
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 |
reduce | Reduce density of points 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. |
Finish drawing (close) the ROI. | Double-click, which adds a point at the pointer position and draws a line connecting this point to the first point drawn, closing the ROI. Right-click, which draws a line connecting the last point to the first point drawn. Position the pointer over the first point and click. Press Enter, which draws a line connecting the last point to the first point drawn. |
Resize (reshape) the ROI. | Position pointer over a waypoint and then click and drag. No assistance (snapping to edges) is available in this mode. |
Add a waypoint. | Position the pointer on an edge of the ROI, right-click, and select Add Waypoint. You can also position the pointer on an edge of the ROI and double-click. |
Remove a waypoint. | Position the pointer on a waypoint, right-click, and select Remove Waypoint. |
Move the ROI. | Position the pointer over the ROI. The pointer changes to the fleur shape. Click and drag to move the ROI. |
Delete an ROI. | Position the pointer on the ROI (not on a vertex), right-click, and select
Delete Freehand from the context menu. You can also
delete the ROI programmatically using the delete object
method. |
For information about using an ROI in an app created with App Designer, see Using ROIs in Apps Created with App Designer.
Circle
| Crosshair
| Cuboid
| drawassisted
| Ellipse
| Freehand
| Line
| Point
| Polygon
| Polyline
| Rectangle