next up previous contents
Next: New TCL commands Up: Volrend User's Guide and Previous: Virtual Trackball

Rendering Algorithm

The algorithm used is based on a Bresenham-like algorithm described in [2]. The simplest way to describe this is to consider figure gif.

  
Figure: 2-D representation of rays piercing volume. The actual path taken by the ray through the data volume is given by the solid lines, and projected back onto the image plane (dashed lines)

The algorithm traces rays piercing each voxel that is visible from the image plane. See figure gif for a 2-D representation. As the ray passes from one plane of the data volume to the next, the closest voxel to the ray path is chosen, so that the discretised ray path is a zig-zag through the volume about the actual ray. The transparency of the volume along the ray is calculated by evaluating a path integral where is the volume data, and is a user defined transparency function that can be used to control the contrast of the image.

The most time consuming part of the algorithm is in communication between processors. On the CM5, gridded communication (i.e. shifts) is much faster than general communication. To make the most use of shifts, the partially formed path integrals are held in a variable (integral) that is aligned with a slice through the data volume. Whenever the ray path makes a jump to the neighbouring voxel, the integral variable is shifted out into the image plane, which involves a general communication step, and 0 is shifted in on the opposite edge, thereby initialising an integral corresponding to a ray entering the data volume.

Once the final image has been assembled, it will not be a continuous image, as the rays when projected back onto the image plane do not correspond exactly to the positions of pixels. The resultant image may be very sparse if the size of a voxel is much larger than the size of a pixel. The fill_in_gaps routine interpolates the calculated pixels to form a smooth image.



next up previous contents
Next: New TCL commands Up: Volrend User's Guide and Previous: Virtual Trackball



Russell Standish
Mon Feb 20 17:13:01 EST 1995