In raycasting, the volume rendering integral is approximated by repeated application of the over-operator [54,43] in front-to-back order. That is, at each resample location, the current color and alpha values for a ray are computed in the following way:
and are the color and opacity the ray has accumulated so far. is the reconstructed function value and and are the classified and shaded color and opacity for this value. The advantage of using the front-to-back formulation of the over-operator is the possibility of early ray termination. As soon as a ray has accumulated full opacity (i.e., ), no further processing has to be done for this ray.
This formulation is only valid if compositing is performed at evenly-spaced locations at a distance of 1. If the object sample distance, i.e., the distance between subsequent samples along a ray, differs from 1, opacity correction is needed. Assuming an equal object sample distance for all rays, opacity correction can be achieved by using a corrected lookup table for the opacity values:
(3.13) |
where is the corrected opacity transfer function, is the original opacity transfer function, and is the object sample distance. In Equation 3.12, is then replaced by .