Set new labelvolshow object



setVolume(hLabelVol,L) updates the labelvolshow object hLabelVol with a new labeled volume L. setVolume preserves the current viewpoint and other visualization settings remain unchanged, but the label properties are set to their respective defaults.

setVolume(hLabelVol,L,V) updates the labelvolshow object hLabelVol with a new labeled volume L and a new intensity volume V.


collapse all

Load an intensity volume and an associated labeled volume into the workspace.


Display the labeled volume along with an intensity volume.

hVol = labelvolshow(label,vol)
hVol = 

  labelvolshow with properties:

                 Parent: [1x1 Panel]
         CameraPosition: [4 4 2.5000]
         CameraUpVector: [0 0 1]
           CameraTarget: [0 0 0]
        CameraViewAngle: 15
        BackgroundColor: [0.3000 0.7500 0.9300]
    ShowIntensityVolume: 1
             LabelColor: [4x3 double]
           LabelOpacity: [4x1 double]
        LabelVisibility: [4x1 logical]
          VolumeOpacity: 0.5000
        VolumeThreshold: 0.3922
           ScaleFactors: [1 1 1]
    InteractionsEnabled: 1
          LabelsPresent: [4x1 uint8]

Change some rendering properties.

hVol.VolumeOpacity = 0.2;
hVol.BackgroundColor = 'magenta';

Load another labeled volume into the workspace.

data = load(fullfile(toolboxdir('images'),'imdata','BrainMRILabeled','labels','label_002.mat'));
newLabelVol = data.label;

Change the volume in the labelvolshow object hvol. Note how labelvolshow preserves your rendering settings.


Input Arguments

collapse all

Labeled volume object, specified as a labelvolshow object.

Labeled volumetric data, specified as a 3-D labeled volume.

Volumetric data, specified as a 3-D grayscale volume.

See Also

Introduced in R2019a