The algorithm for MIP of value-sorted voxels can be easily extended to generate depth-shaded images (figure 4.8a). Three depth-templates are generated to calculate the depth of each voxel's projection from it's coordinates by look-up. The intensity value of each voxel is modulated by it's depth and written into the base plane image only if the value of the pixel at this position is smaller than the modulated value. As the depicted maximum values do not directly correspond to data values, applying this method to preprocessed volume data may produce results slightly differing from projecting non-preprocessed data.
The second extension of the algorithm is capable of generating LMIP
images providing the possibility to interactively adjust the threshold
parameter. For generating a MIP image, the order of examining samples
along a ray is not relevant. Straight-forward LMIP requires the
samples to be processed front to back along the viewing ray in order
to find the first local maximum. Using templates for voxel-depth
calculation and two z-buffers per pixel allows to extract the closest
local maximum from samples arriving in arbitrary order. The z[pix]
buffer stores the depth of the currently visible voxel, while
zb[pix] stores a ``back-clipping'' distance for each pixel
which is used to skip voxels belonging to maxima behind the currently
closest one.
As the voxels are processed in order of ascending data value, all
voxels below the LMIP-threshold can be first projected using the simple and
fast MIP algorithm without z-calculation.
Among all voxels above the threshold which are processed later,
closest local maxima have to be
found. At the beginning, z[] is initialized to contain the maximum
possible distance. With z and v containing the depth and
value of a projected voxel, the closest local maximum along a ray is found by
if (z<z[pix]) screen[pix]=v; zb[pix]=z[pix]; z[pix]=z; else if (z<zb[pix]) screen[pix]=v; z[pix]=z;The first condition detects voxels closer than the currently displayed voxel. As they have at least the same intensity as the currently displayed one, they are entered into the
screen and z[]
buffers, the back clipping plane is moved forward to the previous z[]
position (figure 4.9a). The second condition takes care of
new voxels which are
placed between the currently displayed voxel and the back clipping
distance and are at least of the same intensity as the current
one. In this case the screen and z[] are set to the
new voxel. Voxels behind the back clipping distance are ignored
(figure 4.9b).
As the value at zb[] is always older than the value at z[]
it is also smaller due to the ascending processing order of the
voxels. Thus, any voxel which arrives later during processing and is
located behind zb[] can be ignored , as it does definitely not
belong to the closest maximum.