- File Formats
- Rendering Parameters
- Questions & Answers
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.
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
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.
The File menu is used in the standard way, i.e., to open, save, or print documents. You cannot save a parameter window (but you can save your settings in a variety of ways, as described below). Files may also be opened by dropping them onto the MacVol icon in the Finder.
The Edit menu is also a Macintosh standard. Note that Undo is not supported.
The Preferences menu option presents a dialog box, from which you can set two preferences. "PICT file creator" is the four-letter code of the application which you want to be launched when a rendering file is double-clicked. The default is "McVl", which launches MacVol. Other common choices are "Imag" (NIH Image) and "GKON" (Graphic Converter). The other preference setting is "Confirm Close of Volume Window". If this is checked, then a volume (parameter) window will not be closed without confirmation. This is useful if you find yourself accidentally closing large volumes which take a while to load.
"Settings" refers to the set of parameters current in a parameter (i.e. volume) window, or used to create a rendering. Copy Settings copies the current set of parameters to the clipboard. They are plain text; you may switch to some other program (e.g., a text editor) and paste them for future reference. Or you can Apply Settings to some volume window, to recreate previous conditions. Save As Default makes the current settings the default for new volume windows when they are loaded; Apply Default restores a window to the default settings. Finally, Factory Default sets the window to parameters originally used as defaults when the application was packaged.
Note that the settings are saved with the rendering window. They can be viewed as "Comments" using a program such as
and when a rendering is opened in MacVol, you will be able to Copy Settings to obtain the parameters with which the rendering was generated.
The Windows menu lists all open windows. They appear in order with the frontmost window at the top of the menu. Selecting a window title from the menu brings that window to the front.
The Scripts menu lists all compiled, non-applet Applescripts which are contained in a folder called "Scripts" in the same location as the MacVol application. Two sample scripts are packaged with MacVol. Writing scripts for MacVol is discussed is somewhat more detail below.
MacVol can be controlled from AppleScripts in three ways:
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.
- An impromptu script can be run directly from the Script Editor, by clicking the "run" button.
- A compiled script applet can be run by double-clicking it in the Finder.
- 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.
Questions & Answers
- Why does MacVol need so much memory?
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
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.
- Why does MacVol sometimes suddenly quit?
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.
. . . . . . Joe Strout