Volume Viewer

Author: Kai Uwe Barthel (barthel at htw-berlin.de)
Internationale Medieninformatik, HTW Berlin
Berlin, Germany
History: 2005/02/16 (V1.05): First version
2005/03/07 (V1.12): Speedups; planar view indicators; new display mode (projection)
2005/03/15 (V1.21): New and better volume rendering mode; can be called from macros
2007/03/08 (V1.31): Works with RGB stacks
2012/12/03 (V2.01): Added editable transfer functions, lighting, projections, faster rendering
Source:Contained in Volume_Viewer.jar, which can be opened using a ZIP utility
Installation: Download Volume_Viewer.jar to the plugins folder, or subfolder, restart ImageJ, and there will be a new Volume Viewer command in the Plugins menu, or submenu.
Description: This plugin shows stacks as slices, projections or volumes within a 3D-(xyz)-space. This plugin can be used with 8, 16, 32 bit and RGB stacks. The viewing angle can be adjusted with the mouse. The position of the volume may be changed by pressing the SHIFT-key and dragging the mouse.
  • Display Modes:
    • Slice: A slice through the volume.
    • Slice & Borders: A slice through the volume, in addition the borders of the volume stack are displayed.
    • Max Projection: The volume is projected, maximum values (with alpha > 0) are kept.
    • Projection: Voxels are projected using the alpha values as weight.
    • Volume: A 3D redering is performed using alpha blending. The Sampling value controls how many samples are used to blend the volume values. Higher values lead to better looking results, but this will be slower.
  • Transfer functions: Color LUTs can be used for display. Their curves may be modified with the mouse.
  • Transfer functions: Alpha values may be set using four different transfer functions using the luminance, gradient, mean and difference of the voxels.
    • 1D: The alpha value may be drawn as a 1D-function: alpha(luminance)
    • 2D Grad: The alpha value may be drawn as a 2D-function: alpha(luminance, gradient)
    • 2D MD: The alpha value may be drawn as a 2D-function: alpha(mean, difference)
    • 3D Fill: The alpha value may be set as a 3D-function: alpha(x,y,z). By clicking in the planar views alpha and color values may be assigned to voxels with similar intensities.
  • Interpolation modes may be chosen from Nearest Neighbor (fastest), triliniar and two tricubic modes (slowest).
  • The Distance slider adjusts the z screen position of the slice. Only voxels at this distance or further away (for volumes and projections) are displayed. The colored lines in the planar views on the left of the plugin indicate the intersection of the displayed slice and these views. The positions of the planar views may be set with the xy, yz, and xz sliders.
  • The z-Aspect ratio of the volume is read automatically, but it can also be set.
  • The Scale slider sets the zoom factor.
  • Axes: If checked, axes and text are shown.
  • Clipping: If checked, the clipping plane (at the selected distance) is shown.
  • Slice positions: If checked, the positions of planar views are displayed.

This plugin can be called from a macro. This example macro generates 36 volume views of the T1 Head sample stack as it is rotated 360 degrees around the y axis in 10 degree increments.

  run("T1 Head (2.4M, 16-bits)");
  stack1 = getImageID;
  stack2 = 0;
  n = 36;
  for (i=0; i<n; i++) {
    showProgress(i, n);
    angle_y = i * 10;
    run("Volume Viewer", "display_mode=4 scale=2.5 axes=0 interpolation=2 angle_x=0 angle_z=0 angle_y="+ angle_y );
    w=getWidth; h=getHeight;
    if (stack2==0) {
      newImage("Plots", "RGB", w, h, 1);
      stack2 = getImageID;
    } else {
      run("Add Slice");
  run("Select None");
Volume Slicer, an extended version of this macro, and a rendered MicroCT stack, are available at http://doube.net/macros.html#volslice.

Call Volume Viewer with "help" as the parameter to get this list of valid parameters for the run("Volume Viewer",parameters) macro function.


See Also: 3D Color Inspector
3D Surface Plot
Orthogonal View Stack Display
MedNuc OrtView
3D Viewer (hardware-accelerated 3D visualization)


Volume Viewer

Rendering of a series of 110 images of an engine part.

|Plugins | Home |