rtxray — compute a pseudo X-Ray image of a model.
rtxray operates on the indicated objects in the input model.g and produces a simulated X-Ray image. At present, all materials are treated as having the same density. The total path length of each ray through solid material is computed and the result is divided by the "viewsize" (the length of the diagonal of the bounding box of the model, which represents the longest possible path). This relative thickness is then converted to gray scale where black (1) is the greatest possible thickness, through white (255) which represents a very thin region. The color 0 is reserved for rays which pass through no material at all. This provides good contrast for the object (which would not usually be the case if 255 were chosen) and allows the background to be easily replaced.
Most models do not fill their bounding volume (a box which just encloses
the model) so the "safe" scaling described above usually results in very
low contrast (mostly white) objects. Because of this, a default contrast
boost of 2.0 is applied before the path lengths are converted to gray
scale. This value can be changed with the
flag. This value must 1.0 or greater. Larger values provide higher
contrast but may result in clipping values to black (actually 1).
The orientation of the rays to be fired may be specified by
options, in which case the model will be autosized, and the grid
will be centered on the centroid of the model, with ray spacing
chosen to span the entire set of
option, a transformation matrix may be provided on standard input
which maps model-space to view-space.
In this case, the grid ranges from -1.0 <= X,Y <= +1.0 in view space,
with the size of the grid (number of rays fired) specified with
This option is most useful when
is being invoked from a shell script created by an
The following options are recognized.
Number of rays to fire in X and Y directions (square grid). Default is 512 (512x512).
Select azimuth in degrees. Used with
-eand conflicts with
Select elevation in degrees. Used with
-aand conflicts with
Read model2view matrix from standard input. Conflicts with
Contrast enhance the output image by the given factor. Default value is 2.0. See discussion above.
output.bw specifies a named BW(5) file for output. By default, the output is displayed on a frame buffer.
use the alternate "lighting model". In this mode, double precision floating point numbers are written (
-omust be used). Each number is the actual solid material path length for that ray. This allows for post processing and scaling.
See the rt manual page for additional arguments that can be used with this program.
This program should do something about material properties (X-Ray density) in order to provide a more realistic result.
This software is Copyright (c) 1990-2016 United States Government as represented by the U.S. Army Research Laboratory.