Rendering with volshow
The function volshow can display Medical Volumes directly in live scripts. It's a simpler and faster way to display volumes without launching a separate app like the Medical Volume Viewer.
| Display Medical Volume using volshow | |
|---|---|

Volume render of the CTACardio CT volume
By default, volshow creates a 3D viewer with a blue background and a black gradient. Also notice that medicalVolumes are transformed into Anatomical Space (Left-Posterior-Superior).
You can right-click on the volshow window to bring up a contextual menu with additional options, such as displaying a scale bar or voxel info.

If you uncheck "Always embed Viewer in Live Editor", volshow will display the volume in a separate figure.
Adjusting display
If you want to modify the background of the figure, you first need to create an empty scene using viewer3D. Here we create a viewer with a white background and no gradient.
| White Background | |
|---|---|

You can adjust the rendering style by modifying the RenderingStyle field in the volshow handle:
| Change Rendering Style to GradientOpacity | |
|---|---|

Comparison of Rendering Styles using
volshow
We can also modify the Colormap and add a title by modifying the respective fields in the volshow and viewer3d handles, respectively:
| Change colormap and add title | |
|---|---|

mmSetVolShowColors
mmSetVolShowColors is a utility function for volshow that simplifies the customization of the display. It automatically changes the background color of the volshow background to white and then applies a Medical alphamap and colormap to the volume render. The alpha- and colormaps are the same options available in the Medical Volume Viewer
To use, first display a volume using volshow and then simply input the handle from volshow into mmSetVolShowColors.
The function displays a list dialog with a choice of alphamap presets.

Select an alphamap to apply.

Here we apply the lung alphamap and colormap.
Overlaying label maps
Label Maps (or segmentation volumes) can be added as an overlay to the volume rendering using the following syntax.
Notice that "OverlayData" must be inputted as an array (not a medical volume), which is why we input the 'Voxels' field at the second input.

Overlay Render. Kidney (orange and yellow) and Aorta (purple) segmentations overlaid on a volume render of the CTA Cardio CT volume
Here we first create a viewer window (viewer3d), then we have two calls to volshow, with both calls using the same viewer window as the parent. This allows us to create a composite visualization. In the first call, we render the label volume as an "Isosurface". This gives the render that blocky label map appearance. For this call, we use a Colormap setting of "hot" to make the segments appear red. In the second call to volshow, we render the intensity volume as orthogonal slice planes. We also add the label map as overlay data. This adds color to the orthogonal slices where the label overlaps with the intensity volume.

SlicePlane Render. Segments rendered in red. Intensity volume rendered as orthogonal planes
Note, you should be able to click and drag on the orthogonal planes to move their position. This is was enabled due to the order of the volshow calls. Having the second volshow call be the call that uses SlicePlanes rendering enabled interactive manipulation of the orthogonal planes. If the volshow calls were reversed, you wouldn't be able to manipulate the orthogonal planes.