An Evaluation of Reconstruction Filters for Volume Rendering²

Stephen R. Marschner and Richard J. Lobb³ Program of Computer Graphics Cornell University, Ithaca NY 14853 [email protected] [email protected]

Abstract for volume resampling, and Wilhelms and Van Gelder men- To render images from a three-dimensional array of tion Catmull-Rom splines for isosurface topology disam- sample values, it is necessary to interpolate between the biguation [18]. The ªsplattingº methods of Westover [17] samples. This paper is concerned with meth- and Laur & Hanrahan [11] assume a truncated Gaussian ®l- ods that are equivalent to convolving the samples with a re- ter for interpolation, although the interpolation operation is construction ®lter; this covers all commonly used schemes, actually merged with illumination and projection into a sin- including trilinear and cubic interpolation. gle fast but approximate compositing process. Carlbom [3] We ®rst outline the formal basis of interpolation in discusses the design of discrete ªoptimalº ®lters based on three-dimensional theory. We then pro- weighted Chebyshev minimization. All of these schemes pose numerical metrics that can be used to measure ®lter fall within the standard signal processing framework of re- characteristics that are relevant to the appearance of im- construction by convolutionwith a ®lter, which is the model ages generated using that ®lter. We apply those metrics we use to analyze them. to several previously used ®lters and relate the results to The process of interpolation is often seen as a mi- isosurface images of the . We show that the nor aside to the main rendering problem, but we believe it choice of interpolation scheme can have a dramatic effect is of fundamental importance and worthy of closer atten- on image quality, and we discuss the cost/bene®t tradeoff tion. One needs to be aware of the limitations of interpola- inherent in choosing a ®lter. tion, and hence of the images produced, which are usually claimed to represent the original density function prior to 1 Introduction sampling. Sampling and interpolation are also basic to vol- ume resampling, and the cost of using more sophisticated Volume data, such as that from a CT or MRI scanner, is interpolation schemes may well be outweighed by the po- generally in the form of a large array of numbers. In order tential bene®ts of storing and using fewer samples. to render an image of a volume's contents, we need to con- struct from the data a function that assigns a value to every 2 Reconstruction Theory point in the volume, so that we can perform rendering op- erations such as simulating light propagation or extracting 2.1 Review of Fourier analysis isosurfaces. This paper is concerned with the methods of We will review Fourier analysis and sampling theory constructingsuch a function. We restrict our attention to the in two dimensions to make diagrams feasible; the general- case of regular sampling, in which samples are taken on a ization to three dimensions is straightforward. Some initial rectangular lattice. Furthermore, our analysis is in terms of familiarity is assumed; introductions to this subject can be uniform regular sampling, in which we have equal spacing found in [6] and [7]. along all axes, since the non-uniform case can be included Fourier analysis allows us to write a complex-valued

2

! C

by a simple scaling. function g : R as a sum of ªplane wavesº of the form

ω + ω  Given a discrete set of samples, the process of obtain- exp i xx yy . For a periodic function, this can actu- ing a density function that is de®ned throughout the volume ally be done with a discrete sum (a Fourier series), but for is called interpolationor reconstruction;weusetheseterms arbitrary g we need an integral:

interchangeably. Trilinear interpolation is widely used, for Z

1

ω +ω 

i  xx yy

; = ω ; ω  ω ω example in the isosurface extraction algorithms of Wyvill, g x y gà x y e d x d y π 2 et. al. [19], and Lorensen, et. al. [13, 4], and in many ray- 2 R tracing schemes (e.g., that of Levoy [12]). Cubic ®lters The formula to getg à from g is quite similar:

have also received attention: Levoy uses cubic B-splines Z

ω +ω 

i xx yy

ω ; ω =  ;  gà x y g x y e dxdy ² 2

This paper is published in the proceedings of the IEEE Visualization R '94 conference.

³On leave from the Department of Computer Science, University of One intuitive interpretation of these formulae is that

ω ; ω   ;  Auckland, Auckland, New Zealand until August 1994. gà x y measures the correlation over all x y between g k gk

gˆ kˆ gˆ kˆ = gˆk

Figure 1: Two-dimensional sampling in the space domain (top) and the frequency domain (bottom).

ω ; ω 

g and a complex sinusoid of frequency  x y ,andthat the reconstruction ®lter is a low-pass ®lter.

;   ; 

g x y sums up the values at x y of sinusoids of all pos- It is clear from Figure 1 that the simplest region to

ω ; ω 

sible frequencies  x y , weighted byg Ã. We callg à the which we could limitg à is the region of frequencies that are j of g,andjgà the spectrum of g.Since less than half the sampling frequency along each axis. We the Fourier transform is invertible, g andg à are two repre- call this limiting frequency the , denoted sentations of the same function; we refer to g as the space fN, and the region the Nyquist region, denoted RN.Wede- domain representation, or just the signal,andÃg as the fre- ®ne an ideal reconstruction ®lter to have a Fourier trans- quency domain representation. Of particular importance is form that has the value one in the Nyquist region and zero that the Fourier transform of a product of two functions is outside it.1 the of their individual Fourier transforms, and

2.3 Volume reconstruction d

c à Ã

? ? = vice versa: gh = gà h; g h gÃh. Extending the above to handle the three-dimensional 2.2 Basic sampling theory signals encountered in volume rendering is straightforward: We represent a point sample as a scaled Dirac impulse the sampling grid becomes a three-dimensional lattice, and function. With this de®nition, sampling a signal is equiva- the Nyquist region a cube. See [5] for a discussion of signal lent to multiplyingit by a grid of impulses, one at each sam- processing in arbitrary dimensions. ple point, as illustrated in the top half of Figure 1. Given this new Nyquist region, the ideal convolution ®lter is the inverse transform of a cube, which is the product The Fourier transform of a two-dimensional impulse of three sinc functions: grid with frequency fx in x and fy in y is itself a grid of im-

pulses with period fx in x and fy in y. If we call the impulse 3

; ; =        :

hI x y z 2 fN sinc 2 fNx sinc 2 fNy sinc 2 fNz

;   ;  grid k x y and the signal g x y , then the Fourier transform

b à à of the sampled signal, gk,isÃg ? k.Sincek is an impulse grid, Thus, in principle, a volume signal can be exactly re- convolvingg à with kà amounts to duplicatingg à at every point constructed from its samples by convolving with hI,pro- 2 of kÃ, producing the spectrum shown at bottom right in Fig- vided that the signal was suitably band-limited before it ure 1. We call the copy ofg à centered at zero the primary was sampled. spectrum, and the other copies alias spectra. In practice, we can not implement hI, since it has in- Ifg à is zero outside a small enough region that the alias ®nite extent in the space domain, and we are faced with spectra do not overlap the primary spectrum, then we can choosing an imperfect ®lter. This will inevitably introduce some artifacts into the reconstructed function. recoverg à by multiplying gkb by a function hà which is one inside that region and zero elsewhere. Such a multiplica- tion is equivalent to convolving the sampled data gk with h, 3 Practical reconstruction issues the inverse transform of hÃ. This convolution with h allows The image processing ®eld, which makes extensive use us to reconstruct the original signal g by removing, or ®lter- of reconstruction ®lters for image resampling (e.g., [10, 16, ing out, the alias spectra, so we call h a reconstruction ®lter. 1Other de®nitions of an ideal ®lter are possibleÐfor example, a ®lter The goal of reconstruction, then, is to extract, or pass, the h such that hà is one inside a circle of radius fN. primary spectrum, and to suppress, or stop, the alias spectra. 2A signal is band-limited if its spectrum is zero outside some bounded Since the primary spectrum comprises the low frequencies, region in frequency space, usually a cube centered on the origin. Ideal gˆ Imperfect reconstruction filter gˆ Reconstructed spectrum Reconstructed spectrum

Aliasing

– – freq. – – freq. fs fN 0 fN fs fs fN 0 fN fs Primary spectrum Primary spectrum Alias spectrum Alias spectrum Figure 2: Prealiasing (left) and postaliasing (right).

15]), provides a good starting point for analyzing volume shows two band-limited approximations to a square wave, reconstruction ®lters. In particular, Mitchell and Netravali one generated with an ideal low-pass ®lter and the other [15] identi®ed postaliasing, blur, anisotropy, and ringing as with a ®lter that cuts off more gradually but with the same defects arising from imperfect image reconstruction. ultimate cut-off frequency. Perceptually, the latter seems preferable.3 3.1 Postaliasing When a signal is being sampled, we have seen that it Postaliasing arises when energy from the alias spectra must be band-limited if we are to reconstruct it correctly. ªleaks throughº into the reconstruction, due to the recon- Natural signals are not generally band-limited, and so must struction ®lter being signi®cantly non-zero at frequencies be low-pass ®ltered before they are sampled (or, equiva- above fN.Thetermpostaliasing is used to distinguish the lently, the sampling operation must include some form of problem from prealiasing, which occurs when the signal is local averaging). The usual assumption is that an ideal low- insuf®ciently band-limited before sampling, so that energy pass ®lter, cutting off at the Nyquist frequency, is optimal. from the alias spectra ªspills overº into the region of the pri- However, we have just seen that such a ®lter causes ringing mary spectrum. In both cases, frequency components of the around any discontinuities, regardless of any subsequent original signal appear in the reconstructed signal at differ- sampling and reconstruction. If we then reconstruct the ent frequencies (called aliases). The important distinction sampled signal with an ideal reconstruction ®lter, we will between the two types of aliasing is illustrated in Figure 2. end up with exactly the ®ltered signal we sampled, which Sample frequency ripple is a form of postaliasing that has ringing at the discontinuities. To avoid such problems, arises when the ®lter's spectrum is signi®cantly non-zero at either the sampling ®lter or the reconstruction ®lter should lattice points in the frequency domain. The zero-frequency, have a gradual cut-off if the signal to be sampled contains or ªDC,º component of the alias spectra, which is very discontinuities. strong even for signals with littledensity variation, then ap- pears in the interpolated volume as an oscillationat the sam- sharp cutoff gradual cutoff plefrequency. Near-sample-frequency ripple, which occurs when ®lters are non-zero in the immediate vicinity of fre- quency domain lattice points, can also be signi®cant. 3.2 Smoothing (ªblurº) This term refers to the removal of rapid variations in a signal by spatial averaging. Some degree of smoothing is Figure 3: Band-limited square waves. normal during reconstruction, since practical ®lters usually start to cut off well before fN. In image processing, exces- 3.4 Anisotropy sive smoothing results in a blurred image. In volume ren- If the reconstruction ®lter is not spherically symmet- dering, it results in loss of ®ne density structure. Theoreti- ric, the amount of smoothing, postaliasing, and ringing will cally, smoothing is a ®lter defect, but in practice noisy vol- vary according to the orientation of features in the volume ume data may bene®t from some smoothing, since most of with respect to the ®lter. Anisotropy manifests itself as an its ®ne structure is spurious. Also, smoothing is often nec- asymmetry in smoothing or postaliasing artifacts; in the ab- essary to combat the (see below). sence of those, anisotropy can not occur. We therefore re- 3.3 Ringing () gard anisotropy as a secondary effect, and do not measure Low-pass ®ltering of step discontinuities results in os- it separately. cillations,or ringing, just before and after the discontinuity; 3But the former is the optimal band-limited approximation under the this is the Gibbs phenomenon (see for example [14]). Se- L2 norm, which demonstrates the dangers of assuming that the L2 norm is vere ringing is not necessary for band-limitedness: Figure 3 always appropriate.

3.5 Cost This family includes the well-known B-spline (B = 1,

= = :

The remaining critical issue in ®lter design is that of C = 0) and Catmull-Rom spline (B 0, C 0 5). We

; = ; 

cost. Any practical ®lter takes a weighted sum of only a lim- con®ne our attention to ®lters in the range B C 0 0

;  ited number of samples to compute the reconstruction at a to 1 1 . particular point; that is, it is zero outside some ®nite region,

 The (truncated) Gaussian ®lter, which is often used in called the region of support. If a ®lter's region of support is contained within a cube of side length 2r, we call r the splatting algorithms for volume rendering:

2 2

= σ

radius of the ®lter. In this paper, we consider a range of ®l- x 2

; σ =[j j < ] : ters of different radii. It is important to realize that larger hs xm x x xm e ®lters are generally much more expensive: a trilinear inter- polation involves a weighted sum of eight samples, while a  The cosine bell ®lter, which has been widely used as a tricubic ®lter involves 64. In general, the number of sam- window (see below) in one-dimensional signal process- ples involved increases as the cube of the ®lter radius. ing [1], but can also be used as a reconstruction ®lter in The effect of ®lter radius on the run time of a volume its own right:

rendering program depends on the algorithm. Run times for

 =[j j < ] + π = : hs xm x x xm 1 cos x xm simple ray tracing algorithms tend to increase with the cost of each density calculation, i. e., as the cube of the ®lter ra-

 Windowed sinc ®lters. These ®lters approximate the dius. Run times for splattingalgorithms, which precompute ideal sinc ®lter by a ®lter with ®nite support. Simply the two-dimensional ªfootprintº of a ®lter, tend to increase truncating the sinc at some distance leads to problems as the square of the ®lter radius. Lastly, when resampling an with ringing and postaliasing. Instead, the sinc is multi- image or volume on a new lattice that is parallel to the old pliedbyawindow function that drops smoothly to zero. lattice, separable ®lters (see Section 4.1) allow linear time This family approximates a sinc ®lter arbitrarily closely complexity with respect to ®lter radius, using a multi-pass as the radius of the window is increased. We consider algorithm that ®lters once along each axis direction. only one window, namely a cosine bell that reaches zero after two cycles of the . The de®ning equa- 4 Filters to be Analyzed tion of the windowed sinc is

The ®lters we wish to analyze fall into two categories,

 =[j j < ] + π =   = : separable and spherically symmetric. However, a subclass hs xm x x xm 1 cos x xm sinc 4x xm of separable ®lters, the pass-band optimal ®lters, is de®ned in a different way from all other ®lters, and is discussed sep- 4.2 Spherically symmetric ®lters arately below. The value of a spherically symmetric ®lter depends

In the de®ning equations that follow, we use the nota- only on the distance from the origin. Such ®lters can be ] tion [P to be 1 if P is true and 0 otherwise. All but the ®rst

written p

two of the ®lters below need to be normalized by a constant 2 2 2

; ; =  + + : 3 h x y z hr x y z so that their integral over R is equal to one. The two such ®lters we investigate are: 4.1 Separable ®lters

Separable ®lters can be written  a rotated version of the cosine bell. This is simply a ®lter

whose hr is the same as the separable version's hs above.

; ; =      : h x y z hs x hs y hs z

 a spherically symmetric equivalent of the separable win- Included in this category are: dowed sinc, which we call a windowed3-sinc. The 3-sinc (which is not the same as the separable sinc de®ned ear- lier) is the inverse Fourier transform of a function that is  The trilinear ®lter. Trilinear interpolationis equivalent to convolution by the separable ®lter one inside a unit sphere and zero outside. For this ®lter,

3

 =[α < ] + πα α α α=α

hr rm r 1 1 cos sin cos

=[j j < ] j j:

hs x x 1 1 x = where α = r rm.

 A two-parameter family of cubic ®lters, with parameters B and C, studied in two dimensions in [15]: 4.3 Pass-band optimal discrete ®lters

These ®lters, described by Hsu and Marzetta [8] and

;  = hs B C x recommended for use in volume rendering by Carlbom [3],

8 3 are separable. Hence, the following discussion relates to

>

j j +

12 9B 6C x

>

>

j < if jx 1,

> 2 one-dimensional interpolation;the three-dimensional®lters

>

+ + j j +  

< 18 12B 6C x 6 2B

1 3 2 are the products of three one-dimensional ®lters.

j j + + j j +

 B 6C x 6B 30C x All previous ®lters are de®ned by continuous func-

j j <

6 > if 1 x 2,

>

>

j j + +  

> 12B 48C x 8B 24C tions; for any given interpolation position, a ®lter is cen- > :0otherwise.tered on the point of interest, and its values at sample points provide the weights to apply to the data points. That set RN. We de®ne our postaliasing metric, P,tobe

of weights can be regarded as a discrete ®lter that resam- Z

1 Ã 2

= j j ;

ples the input data at new sample points displaced by some P h h dV j ®xed offset from the original sampling points. Carlbom de- jRN RN ®nes an optimal interpolation ®lter as a set of such discrete ®lters, each individually optimized to minimize smooth- where RN is the complement of RN. ing. For each interpolation offset, a weighted Chebyshev The smoothing and postaliasing metrics measure the minimization program [9] is used to obtain a discrete ®l- difference between a particular ®lter and our ideal ®lter in- ter whose Fourier transform has (approximately) a mini- side and outside the Nyquist region respectively; the differ- mum weighted departure from ideal up to some frequency ence is measured in terms of energy. (The ®lter energy in a region is the integral of the square of the ®lter over that fm < fN. By computing a sequence of these ®xed-length optimal region.) Our overshoot metric, , measures how much over- discrete ®lters for offsets in the range 0±1, and interpolat- O

ing between adjacent members, we can construct an under- shoot occurs if a ®lter h is used to band-limit the unit step

= ρ ?  function, ρ . More formally, h max h 1, where lying continuous ®lter. Figure 4 shows two such underlying s O s

ρ is 1 if x > 0and0otherwise. ®lters.4 The design method handles only odd-length dis- s crete ®lters, and thus the underlying ®lters are asymmetric, 5.2 Computation unlike all other ®lters we study. The smoothing and postaliasing metrics are based on A problem with this approach to ®lter design is that the three-dimensional Fourier transforms of the ®lters. All postaliasing is ignored, giving ®lters that are (in a sense) except the pass-band optimal ®lters are even functions, for optimal in the pass band at the expense of relatively poor which the transform simpli®es to the cosine transform [14]: performance in the stop band.

Ã

ω ; ω ; ω = h x y z

1 1 Z

; ;  ω  ω  ω  : h x y z cos xx cos yy cos zz dxdydz 3 5-point 9-point R filter filter For the separable ®lters, the transform further simpli®es to the product of three one-dimensional transforms. For spherically symmetric ®lters, the three-

-3 2 -5 -3 2 4 dimensional integral can be simpli®ed [2] to Figure 4: Two pass-band-optimal ®lters Z π ∞

à 4

ω =   ω  : hr  r rhr r sin rr dr ωr 0 5 Metrics for ®lter quality The smoothing metric is obtained directly from its def- 5.1 De®nitions inition by numerical integration. The postaliasing metric is One of our goals in this research was to obtain some computed from the smoothing metric and the total ®lter en- quantitativemeasures of ®lter quality. As already indicated, ergy. We can compute the total energy in the space domain, choosing a ®lter requires trading off bene®ts and defects ac- where the ®lter has ®nite support, since Parseval's theorem cording to the the nature of the signal, how it was sampled, [14] shows that the result is the same in both space and fre- how much noise is present, how costly a ®lter we can tol- quency domains. erate, and what rendering algorithm is being used. For this Metrics for the pass-band optimal ®lters were com- reason, a single number describing the quality of a ®lterÐ puted from the underlying continuous ®lters illustrated in for example, the L2 norm of the difference between a par- Figure 4. ticular ®lter and the ideal ®lterÐis not an appropriate goal. Accordingly, we de®ne separate metrics for the most impor- 6 Filter Testing tant ®lter qualities: smoothing, postaliasing, and overshoot 6.1 The test volume (ringing). Although numerous datasets are publicly available, we Formally, we de®ne our smoothing metric, S, of a ®lter are unaware of any that are correctly sampled from some h,tobe exactly known signal. This makes it dif®cult to evaluate re-

Z construction techniques, since the ultimate measure of the

1 Ã 2

= j j ;

S h 1 h dV quality of a reconstruction is how closely it approximates j

jRN RN the original signal. Accordingly, we use a test signal

p j

j 2 2

π = +α + ρ  + 

where RN is the Nyquist region, RN is the frequency-space 1 sin z 2 1 r x y

; ; = ; ρ

volume of RN,anddV is an in®nitesimal volume element in x y z

+ α 2 1 4The discrete ®lters were computed using the program [9], modi®ed as where π

described in [8] and [3], and with fm values of 0.3 and 0.4 for the 5-point ρ r =  π  : r cos 2 f cos and 9-point ®lters respectively, as in [3]. r M 2 We sampled this signal on a 40 by 40 by 40 lattice in Postaliasing

r=3.79

< ; ; < = α = : the range 1 x y z 1, with fM 6and 0 25. The 0.1 (0,0.5) function has a slow sinusoidal variation in the z direction (0,0) = Catmull-Rom and a perpendicular frequency-modulated radial variation. With the given parameters, it can be shown that the one- 0.08 pass-band (0,1) dimensional radial signal has 99.8% of its energy below a optimal frequency of 10, and our analysis suggests that the spectrum 0.06 filters of the volume as a whole is similarly band-limited. This AAA5-pt Trilinear

makes it acceptable to point sample the function over the 0.04 9-pt 7-pt

< ; ; < range 1 x y z 1 at 20 samples per unit distance. Note, however, that a signi®cant amount of the function's energy (1,0) lies near the Nyquist frequency, making this signal a very 0.02 windowed sincs r=4.28 = B-Spline demanding ®lter testÐall our ®lters show some perceptible r=4.78 postaliasing and smoothing. 0 Figure 5 shows a ray-traced image of the test volume's 0.2 0.4 0.6 0.8 1

ρ Smoothing ; ; = : isosurface x y z 0 5. Figure 6: Smoothing and postaliasing metrics. 7Results 7.1 Smoothing and Postaliasing Figure 6 shows the smoothing and postaliasing metrics for the trilinear ®lter, the family of cubic ®lters, a range of windowed sincs, and three pass-band optimal ®lters. The metrics for our ideal ®lter would be (0,0), although, as dis- cussed in Section 3.3, some smoothing is usually required, if only to combat overshoot.

Cubic Filters. This family is shown in the ®gure as a

10 by 10 mesh. The mapping from B-C space to smoothing-

;  postaliasing space is not one-to-one: the 1 1 corner of the mesh is ªfoldedº over. The B-spline smoothes the most heavily, but has low postaliasing, while the Catmull-Rom Figure 5: The unsampled test signal. spline produces much less smoothing but has poor postal- iasing properties. The images in Figures 9(a) and 9(b) sup- port these measurements: the B-spline smoothes out the 6.2 Test image rendering large variations in the signalÐthe waves get shallower with increasing frequencyÐand the Catmull-Rom preserves the To demonstrate the behavior of the various ®lters, we depth of the waves at the cost of aliasing, which shows up display isosurfaces of reconstructed test volumes. It is im- as scalloped crests. portant that we show the exact shape of the isosurface, in- cluding small irregularities that can be seen only with de- According to our metrics, the ®lters along the fold

tailed shading. This means we need a gradient that corre- should be best. However, Figure 9(c) shows the test volume

: = : sponds exactly to the reconstructed density function. The reconstructed using one such ®lter (B = 0 5, C 0 85). We usual schemes for rendering isosurfaces (e. g., Lorensen and can see that, while the overall geometry is reproduced quite Cline [13]) approximate the gradients using central differ- faithfully, the surface has a dimpled texture, due to near- ences at sample points and then interpolate those gradients; sample-frequency ripple. The ripples, although of low am- the resulting estimate does not track small-scale changes in plitude, are of high frequency, and so produce large local the isosurface orientation. variations in gradient, and therefore in shading. It is per- haps a limitation of our postaliasing metric that it weights Since our reconstructed density function is the convo- leakage at all frequencies equally. lution of the samples with the reconstruction ®lter, the den- Our experience corroborates the space-domain conver- sity gradient is the convolution of the samples with the gra- gence analysis of Mitchell and Netravali [15], which sug-

dient of the ®lter. For any differentiable ®lter h, we can thus = gests that ®lters along the line 2C + B 1 (which includes obtain an exact formula for the gradient of the reconstructed Catmull-Rom and B-splines as extreme cases) are among function, which can be evaluated at any point in the volume. the best: we ®nd that these ®lters have negligible near- For rendering, we use a ray tracer that displays isosur- sample-frequency ripple. But we see no reason in general faces of arbitrary functions by using a root-®nding algo- to prefer any particular ®lter along that line apriori,since rithm to locate the ®rst crossing of the isosurface level along we must always settle for a tradeoff between smoothing and each ray. postaliasing. Trilinear ®lter. The trilinear ®lter is plotted in Fig- ure 6. It can be seen that its metrics are the same as for Filter Radius Smooth. Postalias.

Cosine bell 1.0 0.67 0.096

: = : a cubic of approximately B = 0 26, C 0 1. Images for these two ®lters are shown in Figure 9(d) and 9(e). They Cosine bell 1.5 0.88 0.002

look similar, except that the trilinear ®lter introduces gradi- Cosine bell 2.0 0.95 0.00008 :

ent discontinuities, which our metrics do not measure. Gauss. σ = 0 50 2.5 0.81 0.014 :

Gauss. σ = 0 60 2.0 0.90 0.002 : Windowed sinc ®lter. The metrics for our particular Gauss. σ = 0 75 2.5 0.95 0.0001 cosine-windowed sinc are shown in Figure 6 for a range of radii. It can be seen from the ®gure that these ®lters are Table 1: Miscellaneous separable ®lter metrics. in a sense superior to the entire family of cubics, since for any cubic ®lter there are windowed sincs with both better spherical surfaces, rather than axis-aligned planes, it proved postaliasing and better smoothing. However, because of impossible to adequately reject sample-frequency ripple their size, they are much more expensive to use than the cu- with ®lters of any reasonable cost. For very high-quality bics. reconstruction, the isotropy of spherically symmetric win- Also, because sample-frequency ripple is so offensive, dowed sinc ®lters could be a signi®cant advantage. only the labelled points are of interest, since they are the only ones for which the ®lter's spectrum has zeroes at the nearest lattice points (see Section 3.1). The results for a radius of 4.78 are shown in Figure 9(f). The wave structure is free of both scalloping and excessive 8 smoothing. (As in all the images, we must ignore the pro- 1 nounced effects of ®ltering the discontinuous outer edge of

overshoot % overshoot 0 C the volume.) However, the ®lter's anisotropy causes signif- 1 icant variations in the height of the circular crests: the ®lter B 0 smoothes more in directions near the coordinate axes than 0 along diagonals. Figure 7: Overshoot metrics for cubic ®lters. The results for a radius of 4.28 are similar, but with slightly more postaliasing. Both these ®lters are roughly

3  two orders of magnitude more expensive (in an Or al- 7.2 Overshoot gorithm) than trilinear interpolation. Our overshoot metrics for the cubic ®lters are graphed in Figure 7. As discussed in Section 3.3, overshoot is pri- Pass-band optimal ®lters The metrics for three differ- marily of concern with volumes containing inadequately ent pass-band optimal ®lters are shown in Figure 6. As ex- smoothed discontinuities;®lters with high overshootshould pected, their excellent pass band performance (low smooth- be avoided in such cases. Figure 8 illustrates the effects of ing) is achieved at the expense of relatively poor postalias- reconstructing a point-sampled cube with a B-spline, which ing. has no overshoot, and with the cubic ®lter most prone to

The 5-point optimal ®lter is wider than the cubic ®lters =

3 overshoot, B = 0, C 1.  (twice the cost, in an Or algorithm) and the 9-point ®l- ter is comparable in cost with the windowed sinc of radius 8 Conclusions 4.78. Also, the pass-band optimal ®lters are more dif®cult to calculate and manipulate generally (e.g., to obtain gradi- Interpolation underpins all volume rendering algo- ents) than other ®lters, so we do not recommend them for rithms working from sampled signals. We have considered general-purpose reconstruction. Their primary use is prob- the family of interpolation schemes that can be expressed as ably for image and volume resampling at a ®xed offset when convolution of a sample lattice with a ®lter. minimal smoothing is the goal. The artifacts resulting from imperfect reconstruction fall into three main categories: smoothing, postaliasing, Other ®lters. Table 1 shows the smoothing and postal- iasing metrics for some representative separable Gaussian and separable cosine bell ®lters. From the metrics, and from several test images, we conclude that the cubics generally perform better for similar cost and are more ¯exible. One exception is the cosine bell of radius 1.5, which, as the met- rics in Table 1 suggest, produces images similar to a B- spline, but at a lower cost. The ®lter does introduce slight local gradient variations, but in many rendering contexts these would not be apparent. We investigated a range of spherically symmetric ®l- Figure 8: A point-sampled cube reconstructed with a ters. However, since the zeroes of their spectra fall on B-spline (left) and with the cubic (0,1). and overshoot. Since reconstruction is necessarily imper- [3] Ingrid Carlbom. Optimal ®lter design for volume reconstruc- fect, choosing a ®lter must involve tradeoffs between these tion and visualization. In Visualization '93, pages 54±61, three artifacts. October 1993. We have de®ned metrics to quantify the characteristics [4] H. E. Cline, W. E. Lorensen, S. Ludke, C. R. Crawford, and of a ®lter in terms of these artifacts. In general, the metrics B. C. Teeter. Two algorithms for the three-dimensional re- correlate well with the observed behavior of the ®lters, al- construction of tomograms. Medical Physics, 15(3):320± though the postaliasing metric does not adequately address 327, May/June 1988. the troublesome problem of ripple in the reconstructed sig- [5] Dan E. Dudgeon and Russel M. Mersereau. Multidimen- nal at or near the sample frequency. sional Signal Processing. Prentice-Hall, 1984. Trilinear interpolation is certainly the cheapest option, [6] J. D. Foley, A. van Dam, S. K. Feiner, and J. F. Hughes. Com- and will likely remain the method of choice for time-critical puter Graphics: Principles and Practices (2nd Edition).Ad- applications. Where higher quality reconstruction is re- dison Wesley, 1990. quired, especially in the presence of rapidly varying sig- [7] Rafael C. Gonzalez and Paul Wintz. Digital Image Process- nals, the family of cubics is recommended. Cubics offer ing (2nd Ed.). Addison-Wesley, Reading, MA, 1987. considerable ¯exibility in the tradeoff between smoothing and postaliasing. For applications in which near-sample- [8] Kai Hsu and ThomasL. Marzetta. Velocity ®ltering of acous- tic well logging waveforms. IEEE Transactions on Acous-

frequency ripple could be a problem, we recommend cubics tics, Speech and Signal Processing, 37(2):265±274, Febru- = for which 2C + B 1; otherwise, ®lters along the ªfoldº line ary 1989. in Figure 6 are preferred. [9] J.H.McClellan, T.W.Parks, and L.R.Rabiner. FIR linear For the most demanding reconstruction problems, win- phase ®lter design program. In IEEE ASSP Society Digital dowed sincs can provide arbitrarily good reconstruction.

3 Signal Processing Committee, editor, Programs for Digital  Their large radii make them extremely expensive in Or Signal Processing, pages 5.1-1±5.1-13. IEEE Press, 1979. algorithms, such as ray-tracing, but they could certainly be

[10] Robert G. Keys. Cubic convolution interpolation for digital  used in an Or resampling algorithm. The radius should be image processing. IEEE Trans. Acoustics, Speech, and Sig- chosen so that the Fourier transform is zero at the sampling nal Processing, ASSP-29(6):1153±1160, December 1981. frequency, in order to eliminate sample-frequency ripple. Spherically symmetric ®lters tend to produce sample- [11] David Laur and Pat Hanrahan. Hierarchical splatting: A progressive re®nement algorithm for volume rendering. In frequency ripple, and do not seem to offer any signi®cant Thomas W. Sederberg, editor, Computer Graphics (SIG- advantages over separable ®lters for most applications. GRAPH '91 Proceedings), volume 25, pages 285±288, July 8.1 Future work 1991. Although the metrics presented in this paper provide a [12] Marc Levoy. Display of surfaces from volume data. IEEE useful guideline, we believe they can be improved. In par- Computer Graphics and Applications, 8(3):29±37, May ticular, the postaliasing metric could be made more sensi- 1988. tive to the frequencies that produce the most objectionable [13] William E. Lorensen and Harvey E. Cline. Marching cubes: artifacts. A high resolution 3D surface construction algorithm. In Given the better reconstruction techniques outlined in Maureen C. Stone, editor, Computer Graphics (SIGGRAPH this paper, it should be possible to represent volume data '87 Proceedings), volume 21, pages 163±169, July 1987. with a sparser sampling lattice. Also, using a precise def- [14] Clare McGillem and George Cooper. Continuous and Dis- inition of the reconstructed signal gives us a framework in crete Signal and System Analysis. Holt, Rinehart and Win- which to evaluate errors introduced by such subsampling or ston, 1984. other forms of data compression. [15] Don P. Mitchell and Arun N. Netravali. Reconstruction ®l- ters in computer graphics. In John Dill, editor, Computer 9 Acknowledgements Graphics (SIGGRAPH '88 Proceedings), volume 22, pages 221±228, August 1988. This work was supported by the NSF/ARPA Science and Technology Center for Computer Graphics and Scien- [16] Stephen K. Park and Robert A. Schowengerdt. Image recon- ti®c Visualization(ASC-8920219). We gratefully acknowl- struction by parametric cubic convolution. Computer Vision, Graphics, and Image Processing, 23(3):258±272, Septem- edge the generous equipment grants from Hewlett-Packard ber 1983. Corporation, on whose workstations the images in this pa- per were generated. We especially wish to thank James [17] Lee Westover. Footprint evaluation for volume rendering. In Durkinfor providingsupport and motivationthroughoutthe Forest Baskett, editor, Computer Graphics (SIGGRAPH '90 Proceedings), volume 24, pages 367±376, August 1990. research. [18] Jane Wilhelms and Allen Van Gelder. Topological consider- References ation in isosurface generation. Technical report, University of California, Santa Cruz, April 1990. [1] K. G. Beauchamp. Signal Processing. George & Allen Un- win Ltd., 1973. [19] Brian Wyvill, Craig McPheeters, and Geoff Wyvill. Data structure for soft objects. The Visual Computer, 2(4):227± [2] S. Bochner and K. Chandrasekharan. Fourier Transforms. 234, 1986. Princeton University Press, 1949.

(a) B-spline (b) Catmull-Rom

: = :

(c) Cubic (B = 0 5, C 0 85) (d) Trilinear

: = : = : (e) Cubic (B = 0 26, C 0 1) (f) Windowed sinc (r 4 8)

Figure 9: Isosurface images of the test signal reconstructed using various ®lters.