Does the “volshow” function in Image Processing Toolbox support interactive scene‑lighting control equivalent to the “orbitscenelight” camera motion mode in MATLAB R2025b?

I am visualising 3‑D volumetric data using the “volshow” function from Image Processing Toolbox in MATLAB R2025b. In earlier workflows with classic axes, I used the Camera Toolbar’s “orbitscenelight” mode to drag the mouse/trackpad and interactively reposition the scene light. With “volshow”, I do not see a way to orbit or otherwise interactively control the light.
Does “volshow” in MATLAB R2025b provide an interactive lighting mode equivalent to “orbitscenelight”? If not, what options do I have to adjust lighting when using “volshow”?

 Akzeptierte Antwort

No. As of MATLAB R2025b, the “volshow” function in Image Processing Toolbox does not include the Camera Toolbar and does not implement an equivalent to the “orbitscenelight” interactive lighting mode.
To work around this, you can try using one of the following methods: 
  • Use the “viewer3d” lighting properties to position the light relative to the camera or at a fixed world location. For example:
    % Create viewer and display a volume
    v = viewer3d;
    vol = volshow(V, Parent=v); % V is your volumetric array
    % Light that stays up/right of the camera (convenient default)
    v.LightPositionMode = "right";
    % Or, fix the light in world coordinates
    v.LightPositionMode = "manual";
    v.LightPosition = [100 50 200]; % set XYZ as needed
In “viewer3d”, default lighting includes ambient light and one light source; switching “LightPositionMode” changes how that light is positioned (e.g., to the right of the camera or behind the target), or you can set an explicit position in manual mode.
  • Use an axes workflow, such as computing an isosurface via the “isosurface” function and displaying it with a “patch” function. In that environment, the Camera Toolbar is available and orbitscenelight works as expected.

Weitere Antworten (0)

Produkte

Version

R2025b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by