MacVol User's Guide

  1. Overview
  2. File Formats
  3. Rendering Parameters
  4. Menus
  5. Scripting
  6. Questions & Answers

Overview

MacVol is a volume rendering program. The general pattern of use is to load a three-dimensional image stack, use the controls on the window that appears to set the desired rendering parameters, generate a rendering (which appears in a new window), and save that rendering to disk.

In practice, it is often desirable to adjust the parameters and render the image multiple times, in order to obtain the best result. MacVol speeds this process by keeping certain information in memory between renderings. The first time you render an image after loading or changing the opacity function, it may take a while; but subsequent renderings, after changing anything except the opacity, will be very fast.

In addition, tasks which you do repeatedly, such as generating stereo pairs, can be automated with simple AppleScripts. Scripts stored in a "Scripts" folder under the application folder automatically appear in a menu, and execute very quickly. Scripts may also be run from the Script Editor or as applets.

File Formats

MacVol reads 8-bit grayscale volumes in PICS or TIFF format.

PICS is a Macintosh format for storing sequences of images. Briefly, each image is stored in the resource fork of the file, as a PICT resource starting at ID #128. This format is read and written by NIH Image, GraphicConverter, and other Mac graphics applications.

TIFF (Tagged Image File Format) is a standard image format common to many platforms. MacVol should be able to read TIFFs created on any computer (even when the byte order is reversed). It can certainly read the standard image stacks saved by NIH Image.

Output files (i.e. renderings) are stored as PICT, a very common Mac format for two-dimensional images.

Rendering Parameters

Menus

Scripting

MacVol can be controlled from AppleScripts in three ways:
  1. An impromptu script can be run directly from the Script Editor, by clicking the "run" button.
  2. A compiled script applet can be run by double-clicking it in the Finder.
  3. A compiled script can be placed in a folder called "Scripts", in the same folder as the MacVol application. It will then appear in the "Scripts" menu within MacVol.
Other OSA-compliant scripting languages should work as well. While the composing of AppleScripts is beyond the scope of this document, the scripts supplied with the MacVol distribution may serve as useful examples, and can be customized to suit your needs.


Questions & Answers

  1. Why does MacVol need so much memory?
  2. MacVol precomputes a lot of information needed for the volume rendering whenever the opacity function changes. This allows it to render very quickly while you're tweaking the orientation, lighting, etc. But it means that it has to keep a lot of data in memory about every voxel. Thus, MacVol is an unavoidable memory hog.

    It might be possible to have a "low-memory mode" which would not precompute this data. But using it this way would be like changing the opacity function every time you render. If you think this might be worthwhile anyway, write to me and let me know.

  3. Why does MacVol sometimes suddenly quit?
  4. The VolPack library aborts the program when it runs out of memory. MacVol attempts to anticipate this by estimating how much memory it needs to process a volume, and refusing to render if it hasn't enough. But if you don't even have enough to open the image stack, MacVol may quit without warning. I will try to put more graceful handling of this condition into the next version.


http://www.strout.net/macvol/doc.html
Last Updated: 8/02/97 . . . . . . Joe Strout