An Evaluation of Reconstruction Filters for Volume Rendering†
Total Page:16
File Type:pdf, Size:1020Kb
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 interpolation 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 signal processing 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 interpolations. 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 Fourier transform 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 Nyquist frequency, 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 convolution 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 reconstruction filter gˆ Imperfect reconstruction filter gˆ Reconstructed spectrum Reconstructed spectrum Aliasing 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.