166 High Performance Visualization
cost. Also, the wider the filter the greater the number of input coefficients
required, which may limit the possible number of cascades of the DWT. For
example, with a block of dimension 64
3
after three stages of the DWT, there
are 8
3
approximation coefficients—too few for another pass with the nine-
tap CDF9/7 filter, but sufficient for one more stage of the narrower, five-tap
CDF5/3 filter.
8.4.7.3 Coefficient Addressing
An important attribute of regular grids is the implicit addressing of grid
vertices. For example, each vertex in the grid can be addressed by an integer
index, (i, j, k) in 3D, whose offsets can be implicitly determined by the serial-
ized storage order. Therefore, only the sampled field value for each grid point
needs to actually be stored. The implicit addressing of expansion coefficients is
easily preserved during storage with frequency truncation. The coefficients are
simply written in the order that they are output from each stage of the filter
bank. With coefficient prioritization, however, the coefficients must be ordered
by their information content. Their addresses are no longer implicit by their
position in the output stream, and must be explicitly preserved. The number
of bits required to uniquely address each of the N expansion coefficients is
log
2
(N), which introduces a sizeable storage overhead.
Consider, however, binning the N expansion coefficients output by the
DWT (which will generically refer to as c[k]) into a collection of P sets,
S
p
= {c
π(i)
|C(p −1) ≤ i<C(p), 0 ≤ i<N− 1}, (8.27)
where C(0) = 0, C(p ≥ 1) =
p
1
|S
p
|, and, as before, π(i) is a permutation
of 0 ...N − 1 such that |c
π(0)
|≥... ≥|c
π(N−1)
|. Then, if within each set
S
p
, the expansion coefficients are stored in their relative order of output from
the filter bank, the addresses of the coefficients need only be stored for sets
S
1
...S
P −1
. The addresses of the elements of S
P
can be inferred from the
addresses of S
1
...S
P −1
. By keeping track of the ordered set of addresses not
found in S
1
...S
P −1
, the lowest address not found in S
1
...S
P −1
is the address
of the first coefficient found in S
P
and so on. If |S
P
| is sufficiently large, the
storage savings can be considerable.
8.4.8 A Hybrid Approach
Frequency truncation and coefficient prioritization each have their
strengths and weaknesses. Frequency truncation preserves the implicit order-
ing of grid vertices, thereby imposing minimum storage overhead, but it offers
only a very coarse grain control over the the level of detail available; incre-
menting or decrementing the j scaling parameter by one changes the number
of grid points by a factor 2
d
. Furthermore, unlike coefficient prioritization,
all coefficients are treated equally regardless of their contribution to the sig-
nal. On the other hand, though, coefficient prioritization allows for arbitrary