Skip to content

MIB 3D Volume Rendering

Back to MIB | User interface | Menu | File


Overview

Starting from MIB version 2.84, a new 3D volume rendering engine is available. The 3D viewer in MIB is capable to show volumes using volume rendering techniques, models as overlays and generate surfaces from the overlay models.

Demonstration

How to enable the new 3D viewer for MATLAB R2022b or newer

Use MIB Preferences dialog
MIB -> Menu -> File -> Preferences -> User interface -> 3D rendering engine
to select the default rendering engine.

Preferences Dialog

  • Viewer3d, R2022b selects the new version of the viewer described on this page.
  • Volshow, R2018b selects an older version of the viewer available from R2018b.

Downsampling of datasets

Whenever 3D volume rendering is selected, the current image volume is transferred into the 3D viewer. During the transfer, it is possible to select color channels or downsample the dataset to improve rendering performance:

Downsampling Dialog


Composition of the 3D viewer

The 3D viewer has two main windows:

  • 3D Controls: the main window for setting parameters, generating surfaces, and making snapshots and animations. Most controls are grouped under corresponding tabs.
  • 3D Viewer: the visualization window used to render volumes and models.

User interface of the 3D viewer

User interface of the 3D viewer


3D Controls -> Menu

Menu gives access to the following operations:

Section Operation Description
File section
Load animation path animations created using the 3D viewer can be saved and loaded back using this operation.
Save animation path save the current animation path to the disk.
Make snapshot starts the MIB snapshot tool to create an image snapshot of the current view.
Make spin movie starts the MIB movie maker tool to create a movie of a camera spin around the object.
Make animation movie starts the MIB movie maker tool to create an animation movie along a predefined path set in the Animation tab.
View section
Default view reset the view to its default state (also via Home in the upper-right corner of the 3D Viewer).
XY view set the view from above (also via Z in the axes, lower-left corner).
XZ view set the view from the Y-side (also via Y in the axes, lower-left corner).
YZ view set the view from the X-side (also via X in the axes, lower-left corner).
Settings section
Background color set the background color for the scene.
Background gradient color set the secondary background color for a gradient.
Background gradient enable to render background as a gradient of two colors.

3D Controls -> Viewer

Viewer Tab

The Viewer tab allows control over the following widgets and parameters:

  • : show or hide the scale bar in the 3D viewer window.
  • : show or hide 3D axes; clicking the axes changes orientation.
  • : show or hide the bounding box around the volume.
  • Help: open this help section of MIB.
  • Ambient light: define strength of the ambient light in the scene.
  • Diffuse light: define strength of the diffuse light in the scene.
  • Rotation: define rotation center:
    • cursor rotate the scene around the current position of the mouse cursor.
    • orbit rotate the scene around the central point of the dataset.

Camera

Use these widgets to specify camera position (updated interactively), it is possible to update any of these fields to modify position of the camera.

  • Zoom camera zoom level.
  • Distance distance from camera to the scene center.
  • Position camera position as a 3-element vector [x y z]. See Camera Graphics Terminology.
  • Target camera target as a 3-element vector [x y z].
  • Up vector upwards direction as a 3-element vector [x y z] (default: [0 0 1]).

3D Controls -> Volume

The Volume tab contains tools for interacting with the shown volume.

3D Controls -> Volume Tab

List of widgets for tweaking visualization settings:

  • : toggle visibility of both volume and model (does not affect surfaces).
  • : toggle volume visualization (does not affect models or surfaces).
  • Renderer:
  • VolumeRendering: render using color and transparency per voxel.
  • GradientOpacity: render with additional transparency based on intensity/luminance gradients; adjust with the Opacity slider.
  • SlicePlanes: use orthogonal slice planes, adjustable via Slices sliders or mouse.
  • Isosurface: show an isosurface at the iso-value slider value.
  • MaximumIntensityProjection: render the highest intensity voxel per ray (luminance for RGB).
  • MinimumIntensityProjection: render the lowest intensity voxel per ray (luminance for RGB).
  • Opacity / iso-value: slider to tweak GradientOpacity and Isosurface settings.
  • Color map: update the colormap; use , Black point, and White point for adjustments.
  • Slices [only for SlicePlanes]: sliders to change orthogonal slice positions.
  • Alpha curve: define transparency for the volume (1 = opaque, 0 = transparent).
  • : select the point.
  • : change position of the selected point.
  • Shift + : add a point at the clicked position.
  • Ctrl + : remove the closest point.
  • Invert: invert the alpha curve.
  • Reset: reset to default state.

3D Controls -> Model

The Model tab contains tools for visualizing the model loaded into MIB.

3D Controls -> Model Tab

List of widgets for tweaking visualization settings:

  • Update overlay: grab the layer specified in Overlay source and visualize it in the 3D Viewer.
  • Overlay source: specify the layer type for visualization as a model.
  • : toggle show/hide all selected materials in the table.
  • Table with materials: list of model materials; each can be shown/hidden and assigned a transparency value (Alpha, 0-1). Right-click for a menu with Generate surface(s) to create surfaces for the Surfaces tab.

3D Controls -> Surfaces

Surfaces generated from the Model tab’s material table (via right-click) are visualized using settings in this tab.

3D Controls -> Surfaces Tab

List of widgets for tweaking visualization settings:

  • Table:
  • C: click to set color for the selected surface.
  • Name: double-click to change the surface name.
  • Alpha: tweak transparency (0-1).
  • : toggle show/hide the selected surface.
  • : toggle wireframe visualization.
  • Additional settings via right mouse click:
    • Save surface(s): export selected surface(s) to SLT format.
    • Remove surface(s): remove the selected surface from the 3D viewer.

3D Controls -> Animation

3D Controls -> Animation Tab

The Animation tab allows setting key frames for making movies with volume animations.
Rendering is done via
Menu -> File -> Make animation movie
Animations can be saved/loaded from
Menu -> File -> Load/Save animation path.

List of widgets for designing animations:

  • Keyframes table: animations are based on key frames added with Add keyframe. Right-click for additional operations:
    • Jump to the keyframe: update the viewer to the selected keyframe.
    • Insert a keyframe: insert the current scene into the sequence.
    • Replace keyframe: replace the selected keyframe with the current view.
    • Remove keyframe: remove the selected keyframe.
  • Add keyframe: add a keyframe to the sequence.
  • : automatically update the scene to match a clicked keyframe.
  • Spin test: test spinning around the specified axis (Z-axis).
  • No. frames: define number of frames for the preview.
  • Delete all: delete all keyframes.
  • Preview: preview the animation.

Back to MIB | User interface | Menu | File