The 3-Fold Redundancy
1.2 Wavelets for Volumetric Data
Wavelet theory provides an elegant multiresolution hierarchy framework based on mul- tiresolution signal analysis which decomposes a function into a smooth approximation of the original function and a set of detailed information at different resolutions. The generalized wavelet series expansion, the discrete, and the continuous wavelet transform are tools used to compute this multiresolution hierarchy of a signal or a function and are closely related to the Fourier series expansion, the discrete, and the continuous Fourier transform. In practice the fast (inverse) wavelet transform implements an efficient al- gorithm to compute the discrete wavelet transform of a signal, which is very similar to the fast (inverse) Fourier transform as well as a two-band analysis (synthesis) subband (de)coding scheme [Mal99] [GW02].
However, before applying the discrete wavelet transform one needs to define appropri- ate basis1 functions. There exist two families of functions, called the scaling functions
{φj,k(t)}(j,k) and the wavelet functions {ψj,k(t)}(j,k). Both functions sets should be
square integrable and should constitute the basis of Vj (which caries the low-frequency approximation) and Wj (which caries the detail approximation), respectively, of an ar- bitrary function f ∈ L2(R). The projection of a function f onto the other subspaces
Vj, Wj is considered as L2(R) → Vj, Wj. With an appropriate inner product defined on each vector space a multiresolution analysis framework can be defined. In this sense Wj can be defined to be the orthogonal complement of Vj. Since then the approximations of f at scales 2j and 2j+1 are equivalent to the orthogonal projections Vj and Vj+1 with
Vj ⊆ Vj+1, one obtains the next finer approximation of f by Vj+1 = Vj⊕ Wj2. In this view orthogonal wavelets carry the details necessary to increase the resolution of a signal approximation. Therefore, each basis function φ should be orthogonal to each basis ψ under the chosen inner product, the basis functions φ, ψ of Vj, Wj should form a basis
1A basis consists of a minimum set of vectors or functions from which all other vectors or functions in
the vector or functions space can be generated by linear combinations.
2Here,⊕ is the union of spaces.
for Vj+1, and each basis ψ, ˆψ of Wj, Wi should be orthogonal to each other (if the last condition is not true the resulting wavelets are sometimes called pre-wavelets).
Wavelet bases often utilize their ability to efficiently approximate special classes of func- tions with only several non-zero wavelet coefficients. Application of these wavelet bases are for example data compression, noise removal or edge enhancement. The design of a wavelet ψ has therefor to be optimized to the considered task or function as well as to generate a maximum number of wavelet coefficients that are close to zero. However, this depends highly on the regularity of a function f , the number of vanishing moments of the wavelet ψ, the size of its support and regularity.
Daubechies wavelets are the optimal choice, because they have minimum support for a considered number of vanishing moments ([Dau88] [Dau92]). Other wavelets, as for ex- ample the Haar wavelets, the Mexican Hat, Shannon, Meyer, or Battle-Lemari´e wavelets, often make a tradeoff between number of vanishing moments and the size of the support. For a very regular function f with only a few singularities a wavelet with many vanishing moments should be preferred to generate a large number of small coefficients. Functions with many singularities are better represented by wavelets with less support at the cost of fewer vanishing moments.
Further, a method to verify the correctness of the analysis and synthesis algorithms is to first compute the forward and backward transform of a signal and afterwards to compare the results with the original function. For a perfect analysis and synthesis of a signal the applied filters have to satisfy some conditions, e.g. the analysis and synthesis filters should be time-reversed versions of each other (cf. [Vet86] [VK95]).
However, unlike cos and sin waves used by the Fourier transform, wavelets have local decay in both spatial domain and frequency domain, hence they are well localized. One similarity between the windowed Fourier and the wavelet transform is that both representations taking inner products of f with a family of functions gω,t= g(x−t)e−iωx and ψu,s= ψ((t−u)/s)/s, respectively. Using discrete multirate filter bank algorithms a fast orthogonal wavelet transform that needs only O(N ) operations for a signal of size N can be implemented. In higher dimensions the wavelet bases of L2(Rd) are constructed by tensor products of separable one-dimensional wavelet functions (cf. [Mal99]). Hence, we have φ(x, y, z) = φ(x)φ(y)φ(z) (1.1) ψ1(x, y, z) = ψ(x)φ(y)φ(z) (1.2) .. . (1.3) ψ8(x, y, z) = ψ(x)ψ(y)ψ(z). (1.4) These eight wavelet functions measure functional variations along the different directions, i.e. intensity or density variations.
However, for given separable three-dimensional scaling and wavelet functions
φj,l,n,m(x, y, z) = 2j/2φ(2jx− l, 2jy− m, 2jz− n) (1.5)
ψj,l,n,m(x, y, z) = 2j/2ψk(2jx− l, 2jy− m, 2jz− n), k ∈ {1, . . . , 8} (1.6) (1.7)
CHAPTER 1. INTRODUCTION
the extension of the one-dimensional discrete wavelet transform can be defined as
Wfφ(j0, l, m, n) = √ 1 LM N L−1 x=0 M−1 y=0 N−1 z=0 f (x, y, z)φj0,l,m,n(x, y, z) (1.8) Wfψk(j, l, m, n) = √ 1 LM N L−1 x=0 M−1 y=0 N−1 z=0 f (x, y, z)ψj,l,m,nk (x, y, z) (1.9)
for k = 1, . . . , 7. As in the one-dimensional case we start with an arbitrary scale j0. The coefficients Wfφ(j0, l, m, n) and Wfψk(j, l, m, n) define the approximation of the three- dimensional function f (x, y, z) at this starting scale j0 and the detail at higher scales
j≥ j0. Usually, j0 = 0 and L = M = N = 2J such that j = 0, 1, . . . , J− 1 and l, m, n = 0, 1, . . . , 2J − 1. Hence, at the finest scale J usually Wfφ(J, l, m, n) is identified with the discrete volume grid samples f (x, y, z). The three-dimensional wavelet transform can be implemented by using digital analysis filters and by down sampling the resulting data. Even more easily, once the one-dimensional transform has been implemented, it can be applied along the different directions of the volume data set separately, i.e. first we compute the one-dimensional transform along the x direction of the volume data set, by reusing the result another one-dimensional transform along the y direction is performed, and finally this result is taken as input to the last call of the one-dimensional wavelet transform along the z direction. This is possible if separable filters are used and results in eight different frequency bands, one approximation band represented by the scale coefficients Wfφ(j0, l, m, n) and seven sets of detail coefficients represented by Wfψk(j, l, m, n) for k = 1, . . . , 7. The inverse wavelet transform reconstructs the function
f (x, y, z) from its wavelet coefficient representation by f (x, y, z) = √ 1 LM N l n m Wfφ(j0, l, m, n)φj0,l,m,n(x, y, z) (1.10) +√ 1 LM N 8 k=1 ∞ j=j0 l n m Wfψk(j, l, m, n)ψkj,l,m,n(x, y, z) (1.11)
and as could be expected, the reconstruction algorithm is similar to the one-dimensional case as well, i.e. at each scale j we have eight sub-volumes representing the eight sub- bands. Each sub-volume is up-sampled by a factor of 2 – zero values are inserted at the new positions – and convolved with the inverse (synthesis) filters.
One should note that in case of finite functions f the boundary of the corresponding discrete signal cj(n) has to be treated differently from the interior part samples. That means, the convolution of a signal close to its boundary with the low and high pass filters requires to know the values beyond the boundary of the signal. With that boundary problems is usually dealt by appropriately designing boundary wavelets, by zero padding of the signal, by symmetrization of the signal (mirroring), or by periodization of the signal.
2 Hierarchical Encoding
In the following, we describe implementation details of our hierarchical volume rendering approach. At first, we discuss aspects, which are different from the standard approach to generate the images. Next, we focus on details on pre-computing the run-length encoding for the spline representation of the hierarchical data in use and on how a qube template is defined that both serves for speeding up intersection computations and allows for minimizing memory accesses by visiting each voxel only once.
2.1 Wavelet Coding Scheme and Octree Representation
In order to be able to include the spline model (see part II) and the numerical integration along a ray (see part I) a new data structure used during run-length encoding of the shear-warp type renderer of part III is required: Quadratic or cubic type-0 or type-6 splines represent the opacity function within a cube ˜Q. More specifically, they represent
the opacity function for each partition of ˜Q, which may be a 24-tetrahedral partition for ˜Q at the finest level as described in Sect. 3 or variations thereof (for details, see
Fig. 2.1).
However, the new hierarchical encoding operates on scalar data on a Cartesian grid of dyadic size. For coding purposes, we perform the following operations in a preprocess- ing context. The classified volume is transformed into the wavelet space, whereby we implement the Haar and a linear wavelet type according to [SS96] [CDSB03] although for discussing the results we restrict ourselves to Haar wavelets since they have shown better performance for the type of data given. Each node of an octree data structure stores an average value of the considered sub cube which we denote as average data, i.e.
Wfφ[j, k]. High frequency components (detail data or Wfψ[j, k]) are computed at each level in order to be able to prune some octree nodes. These are classified as transparent,
homogeneous or heterogeneous depending on the average and detail data of the decom-
posed volume. If all detail data of an octree node are below a user-defined threshold and all child nodes of the current octree node are homogeneous then the current node of the octree becomes homogeneous as well. In the same way we identify transparent nodes. All nodes in the octree, whose parent node is either transparent or homogeneous, are pruned. For each leaf of the octree (which can be on any level j) the determining Bernstein-B´ezier coefficients (see Sec. 2 and 3) are computed from a 2j sub sampling of the original grid.
Further, computing the contribution of the voxel to the final image requires determining the intersection of all rays with these partitions. These intersection points (entrance and exit points of each partition belonging to a voxel) are stored in a pre-computed template called qube or column template (see Sec. 2) in order to speed up computing. It should be emphasized here, that by considering several rays passing through the cube ˜Q allows
reducing memory accesses by up to a factor of 8. Visiting each voxel only once has
been the characteristic of splatting so far but now can be used for shear-warp by this technique as well.
Figure 2.1: Top left: One slice where the different leafs are subdivided by six slicing planes defining the tetrahedral partition of that leafs. Further, each leaf can be transparent, homogeneous or heterogeneous and stores an address to its quadratic or cubic spline coefficients. Top right: One octree leaf of size 4 and its subdivision by the slicing planes. This leaf is representative for 43 voxel cubes. For each voxel cube (addressed by local position coordinates inside the leaf ) there is a 6 bit flag, which stores the plane numbers going through this cube. Bottom: Scanline created from octree, where the blue and green areas are transparent and non-transparent runs. For each non transparent run each voxel stores the address of the spline coefficients (4 bytes), the octree leaf size and the local coordinates of the voxel cube respective the leaf (3 bytes) and a flag indicating the planes to consider at current voxel cube (1 byte).