Cuboids
R2026bDescription
A Cuboids object labels one or more static cuboids in a
Viewer object. The properties of the object control the appearance and
behavior of the static cuboid annotations.
Static ROIs provide high-performance annotations for images and
volumes you display in a Viewer object using imageshow and
volshow, respectively. Use static ROIs to draw large numbers of ROIs on
a viewer. For best performance, specify all the static ROIs together in a single function call
instead of creating multiple objects. Static ROIs are more efficient than customizable
viewer-based ROIs because they support fewer properties for styling, labeling, and interactions.
For a comparison of static viewer-based ROIs with other ROIs, see Choose Approach to Annotate ROIs in Images.
![]()
Creation
You can create a Cuboids object in these ways. For more information,
see Create Static Viewer-Based ROIs.
Use the
uiannotatefunction to create the ROI and display it in a specified viewer.Use the
images.ui.graphics.roi.static.Cuboidsfunction described here. Display the ROI in a viewer by specifying theParentproperty value as the targetViewerobject during creation. Alternatively, display an ROI after you create it by adding the object to theAnnotationsproperty of aViewerobject.
Syntax
Description
c = images.ui.graphics.roi.static.Cuboids creates a
Cuboids object with default property values. Use
c to query and modify properties of the
Cuboids object after you create it.
c = images.ui.graphics.roi.static.Cuboids(
sets one or more properties using name-value arguments.PropertyName=Value)
Example:
c = images.ui.graphics.roi.static.Cuboids(Position=[12 16 10 10 10 4; 30 30
10 10 10 4]) creates a Cuboids object consisting of two
cuboid shapes.
Properties
Examples
Version History
Introduced in R2026b
