Volume Viewer

Author: Kai Uwe Barthel (k.barthel at fhtw-berlin.de)
Internationale Medieninformatik
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
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 volumes within a 3D-(xyz)-space. The viewing angle can be adjusted with the mouse. This plugin can be used with 8, 16 and 32 bit stacks.
  • Display Modes:
    • Slice Nearest Neighbor: A slice through the volume. No interpolation is performed.
    • Slice Trilinear: A slice through the volume using trilinear interpolation.
    • Slice and Borders: A slice through the volume generated using trilinear interpolation, in addition the borders of the volume stack are displayed.
    • Slice and Volume Dots: A slice generated using trilinear interpolation. Only values above the Thr. (threshold) slider value are displayed. Voxels further away than the distance slider are displayed as volume dots.
    • Volume Dots: Voxels are shown according to their distance, no interpolationis performed (quality is poor).
    • Volume: A 3D scene with higher visual quality is rendered. The opacity of the voxels is controlled by the Thr. slider. Values below the threshold are interpreted as transparent. Volume II uses direct volume rendering overlaying voxels from the back. Volume I uses an overlay of front voxels and can achieve more realistic 3D-views even without illumination. The depth slider controls the number of voxels that are used for rendering. (Both volume modes may be very slow for large scales.)
  • Different LUTs can be used for display.
  • The Dist. slider adjusts the distance of the slice. Only voxels further away than this distance are displayed. The lines in the planar views on the left indicate the intersection of the displayed slice and the three orthogonal center planes of the stack.
  • The z-aspect ratio is read automatically, but it can also be set.
  • Axes: If checked, axes and text are shown.
  • Markers: If checked, the start and end positions of the lines in the planar views are displayed in the volume.
  • The Scale slider sets the viewing distance/volume size.
Additional features: If brightness or contrast settings of the stack are adjusted, the data is reread. The position of the volume may be changed by pressing the SHIFT-key and dragging the mouse. If the mouse is released while dragging the mouse, the cube keeps rotating.

This plugin can be called from a macro. This example macro generates volume views of all the images in a stack and stores then in another stack. Volume Slicer, an extended version of this macro, and a rendered MicroCT stack, are available at http://doube.net/macros.html#volslice.

macro "RotatingVolume.txt" {
  requires("1.33r");
  saveSettings();
  stack1 = getImageID;
  stack2 = 0;
  if (nSlices==1)
      exit("Stack required");
  setBatchMode(true);
  n = 6;
  for (i=0; i<n; i++) {
    showProgress(i, n);
    selectImage(stack1);
    gradz = -i * 10;
    // params for mri-stack.tif
    run("Volume Viewer", 
      "display_mode=5 axes=0 markers=0 lut=0 scale=2 z-aspect=4 dist=-300 "
      + "depth=6 thresh=40 angle_x=110 angle_z="+gradz );
    run("Copy");
    w = getWidth; h = getHeight;
    close();     
    if (stack2==0) {
      run("New...", "name=Plots type=RGB Color width="+w+" height="+h+" slices=1");
      stack2 = getImageID;
    } else {
      selectImage(stack2);
      run("Add Slice");
    }
    run("Paste");
  }
  setSlice(1);
  setBatchMode(false);
  restoreSettings();
}
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 83 CT images downloaded from homepage.mac.com/rossetantoine/osirix/Index2.html.

|Plugins | Home |