This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

labelvolshow

Display labeled volume

Description

Display labeled volumetric data, creating a labelvolshow object with properties that control the appearance of the display. You can embed the intensity volume with the labeled volume and display both volumes at once.

Creation

Syntax

labelvolshow(L)
labelvolshow(L,V)
labelvolshow(___,Name,Value)
h = labelvolshow(___)

Description

example

labelvolshow(L) displays 3-D labeled volume L in a figure.

labelvolshow(L,V) displays 3-D labeled volume L and 3-D intensity volume V in a figure. L and V must be the same size.

labelvolshow(___,Name,Value) displays volumes, using one or more name-value pairs to set labelvolshow properties that control visualization of the volumes. For a list of these properties, see Properties. Enclose each property in single quotes. For example, 'BackgroundColor'.

h = labelvolshow(___) returns a labelvolshow object, h, with properties that can be used to control visualization of the volumes. Use input arguments from any of the previous syntaxes.

Input Arguments

expand all

Labeled volume, specified as a 3-D numeric array (m-by-n-by-p).

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | categorical

Intensity volume, specified as a 3-D numeric array (m-by-n-by-p).

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | logical

Properties

expand all

Color of the background, specified as a MATLAB® ColorSpec. The intensities must be in the range [0,1].

Location of the camera, or the viewpoint, specified as a three-element vector of the form [x y z]. This vector defines the axes coordinates of the camera location, which is the point from which you view the axes. The camera is oriented along the view axis, which is a straight line that connects the camera position and the camera target. Changing the CameraPosition property changes the point from which you view the volume. For an illustration, see Camera Graphics Terminology (MATLAB). Interactively rotating the volume modifies the value of this property.

Vector defining upwards direction, specified as a three-element vector of the form [x y z]. By default, labelvolshow defines the z-axis as the up direction ([0 0 1]). For an illustration, see Camera Graphics Terminology (MATLAB). Interactively rotating the volume modifies the value of this property.

Point used as the camera target, specified as a three-element vector of the form [x y z]. The camera is oriented along the view axis, which is a straight line that connects the camera position and the camera target. For an illustration, see Camera Graphics Terminology (MATLAB).

Field of view, specified as a scalar angle greater than or equal to 0 and less than 180. The greater the angle, the larger the field of view. Also, with bigger angles, objects appear smaller in the scene. For an illustration, see Camera Graphics Terminology (MATLAB).

Interactivity of the volume, specified as true (1) or false (0). When true (default), you can zoom in and out on the labeled volume using the mouse scroll wheel, and rotate the volume by clicking and dragging. Rotation and zoom are performed about the value specified by CameraTarget. When this value is false, you cannot interact with the volume.

Color of labels, specified as a numLabels-by-3 numeric array with values in the range [0 1]. numLabels represents the number of labels in the labeled volume.

Opacity of labels, specified as a numLabels-by-1 numeric vector with values in the range [0 1]. numLabels represents the number of labels in the labeled volume. LabelOpacity is not supported when embedding volumes together.

This property is read-only.

List of label values, specified as a numLabels-by-1 numeric array.numLabels represents the number of labels in the labeled volume.

Visibility of labels, specified as a numLabels-by-1 logical mask. numLabels represents the number of labels in the labeled volume.

Parent of the labelvolshow object, specified as a handle to a uipanel or figure. If you do not specify a parent, the parent of the labelvolshow object is gcf.

Scale factors used to rescale volumes, specified as a 1-by-3 positive numeric vector. The values in the array correspond to the scale factor applied in the x-, y-, and z-direction.

Display intensity volume, specified as true (1) or false (0). When the value is true, the function displays both the labeled volume and the intensity volume. When the value is false, the function only displays the labeled volume. The default is true when the labelvolshow object contains both a labeled volume and an intensity volume. The default is false when the object contains only a labeled volume.

Opacity of volume, specified as a scalar in the range [0 1]. This value defines the opacity of volume data when both labeled and intensity volumes are embedded together. All the embedded volume intensities above the VolumeThreshold value have the opacity of VolumeOpacity.

Threshold of volume intensities, specified as a normalized numeric scalar in the range [0 1]. All the volume intensities below this threshold value have an opacity of 0.

Object Functions

setVolumeSet new labelvolshow object

Examples

collapse all

Create a synthetic volume and categorize the values to create a labeled volume.

vol = rand(100,100,3);
labeledVol = discretize(vol,[0 .25 .75 1],'categorical',...
    {'small','medium','large'});

View the labeled volume and the intensity volume.

h = labelvolshow(labeledVol,vol);

Hide the intensity volume.

h.ShowIntensityVolume = false;

Create a synthetic volume and categorize the values to create a labeled volume.

vol = rand(100,100,3);
labeledVol = discretize(vol,[0 .25 .75 1],'categorical',...
    {'small','medium','large'});

Display the labeled volume.

h = labelvolshow(labeledVol,vol);

Change the color and opacity.

h.LabelColor(end,:) = [1 1 0];
h.LabelOpacity(2) = 0.1;

Introduced in R2019a