label3d is a shell script that processes a Raster3D input file containing label descriptors (object types 10, 11, 12) into a TIFF image label3d.tiff containing both the molecular graphics image and the associated labels.

label3d can accept input either from a file or from stdin.

label3d render_input_file.r3d; display label3d.tiff
cat list-of-files | label3d -

Unfortunately, the Raster3D render program cannot process labels. To overcome this lack, earlier Raster3D distributions included an auxilliary program r3dtops that complements render in that it can process the labels but not the graphics objects. The r3dtops code is now part of the render program itself, and is invoked if the -labels command line switch is present. In this case the labels are converted to PostScript commands and placed in a file The label3d script automates the process of rendering the image, running the resulting PostScript file through ghostscript, and then recombining the two component images into a single TIFF image containing both the molecular graphics objects and the associated labels.

Several intermediate files are produced by label3d:


Example 7 (figure at right) in the Raster3D distribution illustrates the use of the label3d script. The example script actually produces a stereo pair that shows labels positioned in three dimensions.


This script requires TIFF support in render, the unix utility sed, the ImageMagick image processing package, and ghostscript. The intermediate files listed above are created each time the script is run. Any exiting files by these names will be destroyed.



Ethan A Merritt.
Back to top Raster3D homepage