Skip to content

About

This example shows how to build an UI component in App Designer for exploring 3-D volumetric data. VolumeShow wraps the volshow function and adds a synchronized colorbar plus a 2-D slice panel for cross-sectional navigation.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Volume Show Example: Embeddable Volume Display Component for MATLAB

Open in MATLAB Online

VolumeShow is an embeddable MATLAB® UI component for interactive 3-D volume visualization. Use it when calling volshow directly is not enough: it adds a colorbar synchronized with the volume and a linked 2-D slice panel, so you do not have to build those pieces yourself.

VolumeShow component

About This Example

VolumeShow is a custom UI component built in App Designer that wraps volshow with a synchronized colorbar and a 2-D slice panel for cross-sectional navigation. Use it to interactively rotate, zoom, and pan 3-D volume data while changing rendering styles and colormaps.

When you select the "SlicePlanes" rendering style, the component displays three orthogonal slice planes in the 3-D viewer alongside a synchronized 2-D panel. The panel detects which plane you selected and updates the corresponding cross-section in real time as you drag it.

Because VolumeShow is a UI component rather than a standalone app, you can embed it in your own UI figure and drive it from ordinary controls such as drop-downs and sliders.

Setup

Products

Requires MATLAB® R2026b or newer.

Also requires the following MathWorks products:

  • Image Processing Toolbox™

Getting Started

Open VolumeShow.mlapp in App Designer, or create the component directly in the Command Window:

load mri.mat
D = squeeze(D);
comp = VolumeShow(VolumeData=D);

To inspect or modify the component implementation, open VolumeShow.mlapp in App Designer:

appdesigner("VolumeShow")

Component Properties

Property Description
VolumeData 3-D volumetric data, specified as a 3-D numeric array
RenderingStyle Volume rendering style, specified as any style supported by volshow. The default value is "VolumeRendering"
Colormap Color mapping, specified as a named colormap string or an N-by-3 array of RGB triplets. The default value is "parula"
SlicePlaneValues Read-only positions of the slice planes, populated when RenderingStyle is "SlicePlanes"

Specify these properties as name-value arguments during construction, or assign them with dot notation afterward.

Example Files

File Description
VolumeShow.mlapp The App Designer custom UI component
gifs/volumeActions.gif Rotating, zooming, and panning the volume
gifs/slicePlanesUI.gif Slice plane navigation with the synchronized 2-D panel
gifs/exploreVolumeUI.gif The component embedded in a UI figure with drop-down controls

License

The license is available in the license.txt file in this GitHub® repository.

Community Support

MATLAB Central

Copyright 2026 The MathWorks, Inc.

About

This example shows how to build an UI component in App Designer for exploring 3-D volumetric data. VolumeShow wraps the volshow function and adds a synchronized colorbar plus a 2-D slice panel for cross-sectional navigation.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors