Links to source code, shell scripts, parameter files, etc., are provided in this and a related page. You can grab these files as needed, or you can download everything as one compressed tar file by clicking here.
Sample set 1. Line source near a
cylinder. Links to MPEG encoder "parameter" files provided with this
set. (Examples include relatively small MPEG files.)
Sample
set 2. Pulsed plane wave illumination of a rectangular scatterer
with slots. (Examples include large MPEG files.)
A subroutine to generate
appropriate raw files:
wrtraw.f.
This subroutine, or one that similarly generates output, should be incorporated into existing code as described in the paper. This routine uses nested DO loops to write to a direct access file. Some compilers do this very inefficiently. Alternatively, the same thing can be accomplished using a single, insanely large, write statement. That version of the code is available by clicking here: wrtraw-one-shot.f
If you work primarily with two-dimensional arrays, one of the preceding routines (or a slight varient) should serve your needs well. However, if you work primarily with three-dimensional arrays, the preceding routines do not work very well. With slight modification they can be made to work in a three-dimensional context, but those modifications may not be vary flexible (i.e., getting output over different slices would require modifying the code, recompiling the program and running again). Instead, here is a much more flexible version of a raw-file generation routine that works with either two- or three-dimensional arrays and permits capturing data over any slice of the three-dimensional array: wrtraw3d.f. Please see the comment lines in the code for calling syntax.
A C version of this three-dimensional slicing routine is available
by clicking here:
wrtraw3d.c. Again, please see the comment lines in the code for
calling syntax. Riaz Siushansian (riaz@uda.dgcd.doc.ca)
developed a modified version of this code that is better suited for
use with dynamically allocated arrays. His code, along with the array
allocation functions, can be obtained by clicking here:
wrtraw-riaz.c.
Program to covert the raw
files to PGM or PPM files:
rw2pnm.f. The conversion is typically done as post-processing of
the data, i.e., this program is run after all the raw files
have been created. This program requires the following subroutines
(which are already included in the source listing):
Convert color coordinates from hsv space to RGB space:
hsvrgb.f.
Mapping used for "one-sided" color output:
cmap1.f.
Mapping used for "two-sided" color output:
cmap2.f (zero = black) or
cmap2.f (zero = blue). Choose the one you prefer. Or, you can call
one of these mappings cmap3 and modify the rw2pnm
accordingly. In that way you can select the mapping you want at run
time.
As mentioned in the paper,
the C version of rw2pnm is significantly faster than the
Fortran version (in fact, it is close to an order of magnitude
faster). So, if you are comfortable using C (or can even just compile
a C routine), you should probably grab these routines instead of the
Fortran routines. Here they are:
rw2pnm.c,
hsvrgb.c,
cmap1.c, cmap2.c
(zero = black) and
cmap2.c (zero = blue).
The rw2pnm
program paints along the left side of the image a ten-pixel wide view
of the color mapping that was used. A slightly modified version of
code allows the user to select the width of this mapping. If the user
enters zero for the width, no map is displayed. This code can be
obtained by clicking here:
rw2pnm-vw.c (the "vw" stands for "variable width"
color map). This routine uses the same functions as
rw2pnm.c.
The concurrent processing
of images requires the conversion routine to work on a single file and
then terminate (at least our implementation has this requirement).
Here is a program to covert a single raw file to a PGM or
PPM file:
rw2pnm1.c. (We have not bothered to write a Fortran version, but
conversion to Fortran is simple.) This routine uses the same functions
as rw2pnm.c.
John B.
Schneider, schneidj@eecs.wsu.edu
Patrick J.
Flynn, flynn@ee.eng.ohio-state.edu
Kurt Shlager, kurt.shlager@lmco.com