![]() |
The main purpose of the template is to allow fast
identification of the pixels affected by the projection of a cell.
At each of these pixels, the cell's influence on the maximum of the
ray through this pixel and thus to the pixel value has to be
evaluated. A sufficiently accurate calculation of this contribution
requires several steps of trilinear interpolation along the ray
within the cell. To save time during cell projection, it is quite
useful to pre-calculate
entry and exit coordinates of the ray for each pixel of the
template. Interpolation weights
(
,
,
for trilinear interpolation) of the entry
and exit points are stored for this purpose.
As only parallel projection is used, the shape and size of the projected images of all cells is identical in a continuous image space. Due to arbitrary scaling and rotation of the volume for viewing and the discrete nature of a pixelized image, images of cells differ by an individual sub-pixel displacement with respect to the pixels of the image (see figure 4.14), which also leads to differing sets of pixels covered by a cell's image. To account for this shift with sufficient accuracy, the projection has to be performed with sub-pixel accuracy, allowing to place a cell's image in between image-pixel positions. The placement on a 4x4 grid within a pixel produces satisfying results.
The placement of cell images on sub-pixel positions leads to slightly
different shapes of the templates for different
/
-displacements
and also requires the calculation of individual ray
entry/exit-positions for each of the templates. The resulting (4x4)
array of templates can be directly accessed during rendering using the
sub-pixel displacements of a cell's projection.
To optimize the rendering performance each element (=pixel) of the template stores a set of values:
Before rendering, the template is optimized to speed-up access. To avoid the necessity of skipping non-covered pixels within a template, just a list of covered template entries is stored instead of a 2D array. Thus, each template is just an array of image offset and ray-information elements for locations covered by a cell's projection.