Mastering Windows: Improving Reconstruction
Total Page:16
File Type:pdf, Size:1020Kb
Mastering Windows: Improving Reconstruction Thomas Theul Helwig Hauser Eduard Groller Institute of Computer Graphics Vienna UniversityofTechnology (a) (b) (c) Figure 1: A CT scan of a head reconstructed with (a) linear interp olation and central di erences with linear interp olation, (b) Catmull-Rom spline and derivative and (c) Kaiser windowed sinc and cosc of width three with numerically optimal parameters. dows. The latter two are particularly useful since b oth have Abstract a parameter to control their shap e, which, on the other hand, requires to nd appropriate values for these parameters. We Ideal reconstruction lters, for function or arbitrary deriva- showhow to derive optimal parameter values for Kaiser and tive reconstruction, have to b e b ounded in order to b e prac- Gaussian windows using a Taylor series expansion of the con- ticable since they are in nite in their spatial extent. This volution sum. Optimal values for function and rst deriva- can b e accomplished bymultiplying them with windowing tive reconstruction for windowwidthsoftwo, three, four and functions. In this pap er we discuss and assess the quality ve are presented explicitly. of commonly used windows and show that most of them are unsatisfactory in terms of numerical accuracy. The b est p er- Keywords: ideal reconstruction, windowing, frequency forming windows are Blackman, Kaiser and Gaussian win- resp onse, Taylor series expansion ftheussl,helwig,[email protected] 1 Intro duction Reconstruction is a fundamental pro cess in volume visualiza- tion. Mo dalities like CT or MRI scanners provide discrete data sets of continuous real ob jects, for instance patients in medical visualization. The function in between sample points has to b e reconstructed. It is well known that a band-limited and prop erly sampled function can be p erfectly reconstructed by convolving the samples with the ideal function reconstruction lter. Simi- larly, derivatives of the function can, due to linearity of con- volution and derivation, directly be reconstructed by con- of the reconstructed function. Goss uses the windowed cosc volving the samples with the corresp onding derivative of the only on sampling p oints,inbetween some interp olation has ideal reconstruction lter. The rst derivative of a three- to b e p erformed which is not stated explicitly. dimensional function, the gradient, can b e interpreted as a Most researchers assess the quality of reconstruction lters normal to an iso-surface passing through the p ointofinter- in frequency domain, whereas Moller et. al [10 ] prop ose a est. This gradient is usually used for shading or classi cation purely numerical metho d op erating in spatial domain. We and therefore the quality of gradient reconstruction strongly will review this metho d in Chapter 4 as it will allowusto a ects the visual app earance of the nal image. derive optimal parameters, in terms of numerical accuracy, From signal pro cessing theory we know that the ideal for the Kaiser and Gaussian windows. function reconstruction lter is the sinc lter. sin x 3 Windowing ideal reconstruction lters if x 6=0 x (1) sinc (x)= 1 if x =0 The windows investigated in this work are The rst derivative of the sinc lter, called cosc lter, - The rectangular windoworbox function cos (x)sinc(x) if x 6=0 x 1 if jxj (2) cosc (x)= (x)= (3) 0 if x =0 0 else consequently is the ideal rst derivative reconstruction l- which p erforms pure truncation. th ter [1]. In general, the ideal reconstruction lter of the n th - The Bartlett window, which is actually just a tent func- derivative of a function is the n derivative of the sinc func- tion: tion. However, since these lters are in nite in their spatial jxj if jxj < 1 (4) Bartlett (x)= extent they are impracticable. Simple truncation causes 0 else severe ringing artifacts, as can be seen in Fig. 6, which shows the Marschner-Lobb data set [6 ] reconstructed with - The Welch window: linear interp olation and central di erences and linear inter- 2 p olation (Fig. 6a), the Catmull-Rom spline and derivative x jxj < 1 (5) Welch (x)= (Fig. 6b) and the truncated cosc of width three (Fig. 6c). 0 else (for high resolution images please refer to the web page of this pro ject [15 ]). We will investigate and explain the cause - The Parzen window of this bad result in frequency domain in Chapter 3 and in ( 2 3 spatial domain in Chapter 4. 4 6jxj +3jxj 0 jxj < 1 1 3 To reduce artifacts originating from truncation the ideal Parzen (x)= (2 jxj) 1 jxj < 2 4 reconstruction lters can be multiplied with appropriate 0 else functions which drop o more smo othly at the edges. Wewill (6) discuss some of the more commonly used of these functions, is a piece-wise cubic approximation of the Gaussian which are adversely called windows. Weshow that most of window with extend two. Although its width is not them are unsuitable for reconstruction, esp ecially for higher directly adjustable it can, of course, b e scaled to every order derivative reconstruction, although some, for example desired extend. Hamming [5 ] and Lanczos [16 ] windows, are rep orted to b e commonly used. - The Hann window (due to Julius van Hann, often wrongly referred to as Hanning window [17 ], sometimes just cosine b ell window) and Hamming window, which 2 Previous work are quite similar, they only di er in the choiceofone parameter : Turkowski [16 ] used windowed sinc functions for image re- x sampling. He found the Lanczos window sup erior in terms +(1 )cos( ) jxj < H (x)= (7) ; of reduction of aliasing, sharpness, and minimal ringing as 0 else conclusion of an empirical exp eriment. Marschner and Lobb [6 ] used a cosine-b ell windowed sinc 1 b eing the Hann windowand =0:54 the with = 2 (often called Hann window) and found it sup erior to the en- Hamming Window. tire family of cubic reconstruction lters. According to their metric there is always a windowed sinc with b etter smo oth- - The Blackman window, which has one additional cosine ing and p ost-aliasing prop erties. Machira ju and Yagel [5 ] term as compared to the Hann and Hamming window. use a Hamming windowed sinc without further explanation ( 1 x 0:42 + cos ( )+ of their choice. However, we found the Hamming window 2 x Blackman (x)= 0:08 cos (2 ) jxj < of not being optimal. Recently, Meijering et al. [7 ] per- 0 else formed a purely quantitative comparison of eleven windowed (8) sinc functions. They found the Welch, Cosine, Lanczos and Kaiser windows yielding the b est results and noted that the - The Lanczos window, which is the central lob e of a sinc truncated sinc was one of the worst p erforming reconstruc- function scaled to a certain extend. tion lters. x ) sin( Goss [2] extended the idea of windowing the ideal recon- jxj < x (9) Lanczos (x)= struction lter to derivative reconstruction. The parameter 0 else of the Kaiser windowcontrols the smo othing characteristics 1.2 1.2 rectangular window Hann window Bartlett window Hamming window 1 Welch window 1 Blackman window Parzen window Lanczos window 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 spatial domain 1.2 1.2 rectangular windowed sinc Hann windowed sinc Bartlett windowed sinc Hamming windowed sinc Welch windowed sinc Blackman windowed sinc 1 Parzen windowed sinc 1 Lanczos windowed sinc ideal ideal 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 pi pi frequency domain 3.5 3.5 rectangular windowed cosc Hann windowed cosc Bartlett windowed cosc Hamming windowed cosc 3 Welch windowed cosc 3 Blackman windowed cosc Parzen windowed cosc Lanczos windowed cosc ideal Ideal 2.5 2.5 2 2 1.5 1.5 1 1 0.5 0.5 0 0 0 pi 2pi 0 pi 2pi Figure 2: Rectangular, Bartlett, Welch, Parzen, Hann, Hamming, Blackman and Lanczos windows of width two on top, b elow the frequency resp onses of corresp ondingly windowed sinc and cosc functions. window. It is in its general form de ned by - The Kaiser window [3], which has an adjustable param- eter which controls how steeply it approaches zero at 2 x ( ) the edges. It is de ned by 2 jxj < Gauss (x)= (11) ; 0 else ( p 2 1(x= ) ) I ( 0 with b eing the standard deviation. The higher jxj I ( ) (10) Kaiser (x)= 0 ; gets, the wider the Gaussian window b ecomes and, on 0 else the other hand, the more severe gets the truncation. All these windows, except Kaiser and Gaussian windows, are where I (x) is the zeroth order mo di ed Bessel func- 0 depicted in Fig. 2 on top, the frequency resp onses of corre- tion [13 ]. The higher gets the narrower b ecomes the sp ondingly windowed sinc (with window width two) in the Kaiser window. middle row and windowed cosc in the bottom row. Since function reconstruction lters are even functions and rst derivative lters are odd functions, the power sp ectra, as - and we can also use a truncated Gaussian function as 1.2 1.2 Kaiser window alpha=2 Gaussian window sigma=1.0 alpha=4 sigma=1.5 1 alpha=8 1 sigma=1.8 alpha=16 sigma=2.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 -0.2 -0.2 -3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 spatial domain 1.2 1.2 Kaiser windowed sinc alpha=2 Gaussian windowed sinc sigma=1.0 alpha=4 sigma=1.5 alpha=8 sigma=1.8 1 alpha=16 1 sigma=2.0 ideal ideal 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 pi pi frequency domain 4 3.5 Kaiser windowed cosc alpha=2 Gaussian windowed cosc sigma=1.0 alpha=4 sigma=1.5 3.5 alpha=8 3 sigma=1.8 alpha=16 sigma=2.0 Ideal Ideal 3 2.5 2.5 2 2 1.5 1.5 1 1 0.5 0.5 0 0 0 pi 2pi 0 pi 2pi Figure 3: Kaiser and Gaussian windows of width twowithvarying parameters on top, b elow again the frequency resp onses of corresp ondingly windowed sinc and cosc functions.