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.
Load another intensity volume and an associated labeled volume into the workspace.
im = load(fullfile(toolboxdir('images'),'imdata','BrainMRILabeled','images','vol_002.mat'));
data = load(fullfile(toolboxdir('images'),'imdata','BrainMRILabeled','labels','label_002.mat'));
newIntensityVol = im.vol;
newLabelVol = data.label;
Change the volume in the labelvolshow object hVol. Note how labelvolshow preserves the rendering settings of the background color and intensity volume transparency.