Using higher order harmonics in MTF calculations Antonio Gonz´ alez-L´ opez Hospital Universitario Virgen de la Arrixaca, ctra. Madrid-Cartagena, 30120 El Palmar (Murcia), Spain E-mail:
[email protected] November 2016 Abstract. Scanning a bar pattern image along the direction perpendicular to the bars produces a periodic wave. This wave can be decomposed into a sum of harmonics by means of its Fourier series. Oversampling bar pattern images produces output waves with a high signal to noise ratio (SNR), and this high SNR allows the use of several harmonics of the wave for MTF calculations. However, increasing the order of the harmonic used for the calculation entails a loss of accuracy. In this work, some limiting factors to the use of these harmonics are investigated and their effects are quantified. Also, a criterion to discern if a given harmonic should be used is presented. Synthetic phantom images with several bar groups of different frequencies are generated through a process that simulates blurring, sampling and noise addition. Then, an output wave is obtained for each group of bars, and the MTF at the frequencies of its first odd harmonics are calculated. Five noise levels were simulated spanning an exposure range from 0.02 mR to 200 mR. Spatial sampling introduces errors in the estimation of the wave period resulting in underestimates of the MTF calculations. An error of 2% in the wave period produces underestimates of 0.0%, 0.4%, 1.2% and 2.4% in the MTF values obtained from the 1st , 3rd , 5th , and 7th harmonics of the output wave. Also, a bound for the aliasing error derived from spatial sampling is presented. This bound is inversely proportional to the square of the number of samples per period in the output wave. Increasing the noise level leads to increasing uncertainties in the MTF calculations, being larger at high frequencies and for high order harmonics. In all situations, the SNR of a harmonic can be used to determine the accuracy of the MTF estimation.
Keywords: MTF, bar phantoms, aliasing, uncertainties 1. Introduction The modulation transfer function (MTF) of an imaging system describes the frequency response of the system, depicting its signal transfer characteristics as a function of spatial frequency. These characteristics are usually obtained from the analysis of the image of a test object.
Higher order harmonics in MTF calculations
2
In digital systems, undersampling makes that the detector response depends not only on its response characteristics but on the phantom pattern location relative to the sampling grid of the detector [1]. The standard IEC 62220-1 describes a procedure for determining the MTF of radiology equipment [2]. This standard specifies beam qualities, test phantoms, and image processing techniques required for the MTF determination. The test phantom is a radio-opaque edge, and the processing of the test object image includes an oversampling procedure to obtain a pre-sampled MTF. In this way, the eventual aliasing due to undersampling is eliminated or mitigated. At the same time, the signal to noise ratio (SNR) of the analyzed profile is increased. Test objects like pinholes [3], slits [4], edges [5], or bar patterns [6, 7, 8] have been used for the MTF determination. Recently, oversampling procedures have been applied to periodic test objects as star bar patterns or bar patterns [9, 10]. These procedures have shown to be accurate even in the presence of high levels of noise. In such a situation, periodic patterns outperform the edge method in terms of immunity against noise. Using a star bar pattern phantom or an edge phantom allows the calculation of the MTF at any frequency value of an interval. On the other hand, the calculation of the MTF from bar pattern phantom is limited to the frequencies of the bar groups that it contains. A bar pattern image provides a square wave input to the system that can be decomposed in infinite harmonics. Using some of these harmonics could increase the number of frequency values at which the system MTF can be calculated. These harmonics could also be used to explore the MTF at higher frequencies than those of the bar groups. Theoretically, the MTF at the frequency of a harmonic of a square wave can be calculated as the absolute value of the ratio between the harmonic present in the output wave and the harmonic present in the input square wave [10]. However, two facts limit the number of harmonics that can be used for MTF calculations: the amplitude of these harmonics decreases rapidly and corrupting noise is present in the analyzed image. Noise is not the only factor limiting the accuracy and precision. Spatial sampling can introduce aliasing, worsening the precision of the calculated MTF values. Also, the amplitude of a harmonic of a discrete signal is calculated from its discrete Fourier transform (DFT), and the period of this discrete signal is taken as a multiple of the sampling size. This period may be different from the real signal period, resulting in errors in the calculation of the Fourier series coefficients and consequently in the MTF calculations. In this work the effects of noise on the accuracy of the MTF calculation using different harmonics are investigated. Also, errors in the signal period estimation and their incidence in the accuracy of the calculations are quantified, a bound for the aliasing error is obtained, and a SNR-based criterion for the reliability of the MTF calculations is presented.
Higher order harmonics in MTF calculations
3
mm
5
10
15
20
5
10
15
20
25
30
35
40
mm
Figure 1. The synthetic phantom image used in this work consists of seven bar groups of different frequencies.
2. Materials and methods 2.1. Phantom images, MTF calculations and Monte Carlo simulations The bar phantom simulated in this work is inspired on the Xray test pattern type 18 (Huettner Roentgenteste). It consists of seven bar groups with periods 2.00, 1.40 0.99, 0.70, 0.50, 0.35 and 0.25 mm (see figure 1). The phantom images were created following four steps. • First a delta-sampled image of the phantom is created with a resolution of 10µm × 10µm. The images created at this step are binary, using 0 as the low value and 1 as the high value. Signal resolution is 16 bits, mapping integers 0 and 216 − 1 to 0 and 1 respectively. • In a second step, the phantom images are low-pass filtered by convolving them with a rotationally symmetric exponential point spread function (PSF), g(x, y) = √ K ∗ e(−r/σ) , where r = x2 + y 2 , σ = 70µm and K is a normalization constant. • After convolution, the pattern images are downsampled to a resolution of 140µm × 140µm. Downsampling is carried out by defining a new sampling grid and calculating the signal at each point using the nearest neighbor interpolation. Figure 1 shows the image at this step. • Finally, white Gaussian noise is added to obtain the final simulated phantom image. The amount of noise was measured in dB of peak signal to noise ratio (PSNR), defined as the ratio between the maximum possible power of the image and the power of 2 corrupting noise, P SN R(dB) = 10 log10 Range , where σn is the noise standard deviation 2 σn and, in this case, Range = 1. In an ideal detector, the square of the signal to noise ratio q (mm−2 mR−1 ) relates to PSNR by P SN R(dB) = 10log10 (qX∆2 ), where X is the exposure in mR, ∆ is the pixel lateral size in mm and q is the beam quality, as defined by the IEC [2].
Higher order harmonics in MTF calculations Noise X
20 dB 30 dB 0.02 mR 0.2 mR
40 2.0
4 dB 50 mR 20
dB mR
60 dB 200 mR
Table 1. Relationship between noise level (in dB of PSNR) in an ideal detector and detector exposure X (in mR). 1 0.8 0.6
0.4 0.2
0 −1
−0.5
0 mm
0.5
1
Figure 2. One cycle of each of the output waves obtained from the bar patterns in figure 1. Each cycle corresponds to one of the seven bar groups.
For instance, using the radiation quality RQA5 as defined by the IEC [2] and a pixel size of 140µm × 140µm, the relationship between exposure for an ideal detector and noise level is shown in table 1. The full description of the MTF calculation procedure can be found in reference [10]. In order to obtain the MTF, the area where the bars appear in the image is used to obtain an oversampled profile on which the MTF is calculated. Each of the seven groups of line-pairs conforms a periodic wave on this profile, and all the cycles of this wave are averaged in one. Figure 2 shows each of the individual cycles calculated in this way for each of the seven bar groups in figure 1 (note that an oversampling ratio of 10 is used). Each of the discrete profiles in figure 2 is the output wave of the system o(x) for a square wave input s(x) with the same frequency. For a given output wave of frequency f , the optical transfer function (OTF) for any odd multiple of f can be calculated as the ratio Ok OT F (kf ) = , (1) Sk where Ok is the k th Fourier series coefficient of the output wave and Sk is the k th Fourier series coefficient of the square wave input. The MTF is calculated then as the absolute value of the OTF, M T F (kf ) = |OT F (kf )| [11]. In order to study the effect of noise on the MTF determination uncertainty, a Monte Carlo simulation was carried out for every noise level. Each simulation consisted of 40000 trials, and for every trial a MTF calculation was carried out. The calculation
Higher order harmonics in MTF calculations
5
δ>0
δ=0
δ k we have ˆ Ok
− Ok ≤
∞ ∞ 1 4Ak X 1 4Ak X ≤ . 2 2 2 2 π l=1 l N − k π l=1 l (N − k)2
Now, taking into account the value of the Riemann zeta function ς(2) =
∞ P 1 l=1
upper bound for the aliasing error can be written as 2Akπ ˆ Ok − Ok ≤ . 3(N − k)2
l2
=
π2 , 6
an
(7)
Higher order harmonics in MTF calculations
7
2.3. Signal to noise ratio One common definition of SNR is the ratio of the power of a signal and the power of corrupting noise, Psignal (8) SN R = Pnoise For the k th harmonic of the output signal o(x), the power of the signal is the root mean amplitude Psignal = 21 |Ok |2 , where Ok is the k th Fourier series coefficient of o(x). Ok is related to the amplitude A of the input square wave by 2A (9) |Ok | = M T F (kf ) , kπ where f is the frequency of the square wave input. In an oversampling procedure, each value in the output wave is obtained as the average of several pixel values. This averaging process reduces the power of noise. For uncorrelated noise, σn2 , (10) Z where σn is the noise standard deviation and Z is the number of pixels used to obtain one value in the output profile. Z can be estimated as S Z= 2 , (11) ∆ ∗N where S is the area of the bar pattern used to obtain the output profile, ∆ is the lateral size of a squared pixel and N is the number of samples in the output profile. Therefore, the SNR for the k th harmonic can be obtained as Pnoise =
SN R =
1 2
M T F (kf ) 2A kπ
2
2 σn Z
(12)
3. Results 3.1. Errors in the estimation of the wave period Factor Fk (δ), relating the Fourier coefficients Ok and the calculated Ok0 , is presented in figure 4 for k = 1, 3, 5 and 7, the first four odd terms of the Fourier series of the output wave o(x). This factor is symmetric and equal to one for δ = 0 and odd k. Also, as δ deviates from zero Fk decreases and approaches to zero. As can be seen in figure 4, the higher the value of k the faster decreases Fk . An error of 2% in the wave period produces underestimates of 0.0%, 0.4%, 1.2% and 2.4% in the MTF values calculated from the 1st , 3rd , 5th and 7th harmonics respectively, but if the error increases to 5% of the period, the underestimate becomes 0.3%, 2.8%, 7.6% and 14.7%.
Higher order harmonics in MTF calculations
8
1
0.8
0.6
0.4 k=1 k=3 k=5 k=7
0.2
0 -0.1
-0.05
0
0.05
0.1
//T
Figure 4. Factor Fk (δ), relating the absolute values of the Fourier coefficients Ok of the system output o(x) and the calculated coefficients Ok0 , for k = 1, 3, 5, 7. 105 Harmonic #1 Harmonic #3 Harmonic #5 Harmonic #7
103
SNR
101
10-1
10-3
10-5 0
5
10
15
20
25
30
frequency (mm-1)
Figure 5. The SNR of the four first odd harmonic as a function of the frequency for a noise level of 40 dB.
3.2. Signal to noise ratio Figure 5 shows the SNR for every harmonic at every frequency value and for a noise level of 40 dB of PSNR. For a given harmonic, the SNR decreases as the frequency increases. Also, for a given frequency value, the higher the order of the harmonic the lower the SNR. In equation 12 the noise level, represented by σn appears in the denominator. Therefore, for other noise levels the same SNR curves presented in figure 5 are still valid if the vertical axis is conveniently shifted.
Higher order harmonics in MTF calculations
9
3.3. Effect of noise in the MTF determination uncertainties Figures 6, 7 and 8 show the results from the Monte Carlo simulations of the MTF calculations for noise levels of 60 dB, 40 dB and 20 dB respectively. Results for the different bar groups and the first four odd harmonics are presented. Each figure has four subplots, one for each of the different harmonics studied. In each subplot, the seven bar groups give rise to seven MTF calculations (presented as circles). The error bars correspond to 1 SD. A dashed horizontal line represents the noise level, and a vertical dashed line marks the frequency at which the SNR of the harmonic reaches the value of 0.5. Solid lines represent the analytic MTF. The MTF for a circularly symmetric PSF is also circularly symmetric. For the exponential PSF R g(x, y) = K ∗e(−r/σ) , the MTF can be calculated as M T F (f ) = σ12 0∞ re−r/σ J0 (2πf r)dr, where f is the spatial frequency and J0 is the Bessel function of first kind and order 0. Figures 6, 7 and 8 show that, for all those frequencies for which the harmonic SNR is greater than 0.5 the calculated MTF values are accurate. Also, some of the frequencies for which this condition is not satisfied produce inaccurate MTF estimations. For low levels of noise (see figure 6 the SNRs for harmonics 1st and 3rd are greater than 0.5 for all the frequencies studied. For the 5th and 7th harmonics six and four frequencies respectively satisfy this condition. As noise level increases (see figures 7 and 8) the condition is satisfied less frequently. In fact, when the noise level is 20 dB of PSNR, the SNRs for the 5th and 7th harmonics are always smaller than 0.5. 4. Discussion Figure 4 shows how spatial sampling may result in an underestimate of the Fourier series coefficients of a periodic signal. This source of error resides in the difference between the period of the signal and its estimated period as a multiple of the sampling size. The size of the error depends on the difference δ between the real period and the estimated period. For a fixed value of δ, the smallest errors are found for the first Fourier coefficient and, as the order of the coefficients increases the error increases rapidly. This fact limits the number of harmonics in the output signal that can be used in the MTF determination. A simple way to make δ smaller is by increasing the sampling frequency of the output profile or the number of samples per period N . This can be done by augmenting the oversampling ratio. Increasing N will also reduce the aliasing error (see equation 7). However, this would reduce Z, the number of pixels averaged to obtain one value in the output profile, reducing the SNR (see equation 12) and augmenting the uncertainty in the MTF calculation. Increasing the sampling ratio without reducing Z can be done if S, the area of the bar pattern, is increased. Equation 11 shows that Z is proportional to NS . For images, where the variables are always non-negative (such as photon counts and luminance), Rose [13] defines the SNR as SN RRose = σµ , where µ is the signal mean
Higher order harmonics in MTF calculations
10
Harmonic #1
1
0.8
Harmonic #3
MTF
MTF
0.6 0.5
0.4 0.2
0
0 0
1
2
3
4
5
5
-1
0.2
frequency (mm ) Harmonic #7
0.15
MTF
0.3
MTF
15 -1
frequency (mm ) Harmonic #5
0.4
10
0.2 0.1
0.1 0.05
0
0 5
10
15
20 -1
frequency (mm )
25
10
20
30 -1
frequency (mm )
Figure 6. MTF calculation (circles) for a noise level of 60 dB of PSNR. Calculations using the first four odd harmonics of the Fourier series are shown. The solid line is the analytic MTF of the system, the horizontal dashed line represents the noise power and the vertical dashed line represents the frequency value at which the SNR reaches a value of 0.5.
or expected value and σ is the standard deviation of the noise. The Rose criterion [13] states that a SNR of at least 5 is needed to be able to distinguish image features at 100% certainty. Burgess [14] notes that Rose criterion can be used under very specific circumstances and that pixel signal to noise ratio is not a useful measure for description of detection task. For a harmonic, which takes positive and negative values, Rose definition of SNR cannot be applied and definition in equation 8 has to be adopted. However, it is still possible to apply a criterion similar to Rose criterion. In figures 6, 7 and 8 a vertical dashed line is placed at the frequency at which the SNR reaches a value of 0.5. Each of these vertical lines divides the frequency range in two sides. At the left side, the SNR is large enough to obtain an accurate MTF calculation. At the right side, the calculated MTF values show large uncertainties and should be discarded. The reason for these large uncertainties is that MTF values have been calculated under a poor SNR. The selection of 0.5 as a threshold for the SNR is arbitrary. This condition is equivalent to requiring that the amplitude of the harmonic be equal to the standard deviation of noise. However, other threshold values can be adopted depending on the required accuracy and precision for the MTF determinations.
Higher order harmonics in MTF calculations
11
Harmonic #1
1
0.8
Harmonic #3
MTF
MTF
0.6 0.5
0.4 0.2
0
0 0
1
2
3
4
5
5
frequency (mm-1) Harmonic #5
0.4
0.2
15
0.15
MTF
MTF
0.3
10
frequency (mm-1) Harmonic #7
0.2 0.1
0.1 0.05
0
0 5
10
15
20
25
10
-1
20
30 -1
frequency (mm )
frequency (mm )
Figure 7. MTF calculation (circles) for a noise level of 40 dB of PSNR. Calculations using the first four odd harmonics of the Fourier series are shown. The solid line is the analytic MTF of the system, the horizontal dashed line represents the noise power and the vertical dashed line represents the frequency value at which the SNR reaches a value of 0.5. Harmonic #1
1
0.8
Harmonic #3
MTF
MTF
0.6 0.5
0.4 0.2
0
0 0
1
2
3
4
5
5
-1
0.2
frequency (mm ) Harmonic #7
0.15
MTF
0.3
MTF
15 -1
frequency (mm ) Harmonic #5
0.4
10
0.2 0.1
0.1 0.05
0
0 5
10
15
20 -1
frequency (mm )
25
10
20
30 -1
frequency (mm )
Figure 8. MTF calculation (circles) for a noise level of 20 dB of PSNR. Calculations using the first four odd harmonics of the Fourier series are shown. The solid line is the analytic MTF of the system, the horizontal dashed line represents the noise power and the vertical dashed line represents the frequency value at which the SNR reaches a value of 0.5.
Higher order harmonics in MTF calculations
12
5. Conclusion Oversampling a bar pattern image gives rise to output waves with a high signal to noise ratio (SNR). This high SNR allows the use of higher order harmonics of the wave for MTF calculations. These harmonics permit calculating the MTF in a larger number of frequency values and allow investigating the MTF beyond the Nyquist frequency. For an accurate use of these harmonics, the effects of spatial sampling and noise in the uncertainties of the calculations must be taken into account. Spatial sampling may introduce errors in the estimation of the bar group period, and this produces underestimates in the MTF calculated values. Also, spatial sampling gives rise to aliasing, a second source of error in MTF calculations. Finally, the presence on noise in the image introduces uncertainties. In this work the underestimates due to sampling have been quantified and an upper bound for the aliasing error has been presented. With respect to the effect of noise, the SNR of the harmonics can be used as a criterion for the reliability of the calculated MTF values. In this regard, it has been shown that reducing the aliasing error by increasing the sampling frequency leads to a worse SNR. Therefore N , the number of samples per period, has to be taken carefully because a value of N too large would result in a poor SNR, discarding a large number of MTF calculated values. On the other hand, a value of N too small would imply a large aliasing error. References [1] Dobbins J T 1995 Effects of undersampling on the proper interpretation of modulation transfer function, noise power spectra, and noise equivalent quanta of digital imaging systems Med. Phys. 22 171–81 [2] Flynn M 2003 IEC 62220-1 Determination of DQE for digital x-ray imaging devices vol 2003 [3] Marshall N W and Bosmans H 2012 Measurements of system sharpness for two digital breast tomosynthesis systems Phys. Med. Biol. 57 7629-50 [4] Fujita H, Tsai D Y, Itoh T, Doi K, Morishita J, Ueda K and Ohtsuka A 1992 A simple method for determining the modulation transfer function in digital radiography. IEEE Trans. Med. Imaging 11 34-9 [5] Samei E, Buhr E, Granfors P, Vandenbroucke D and Wang X 2005 Comparison of edge analysis techniques for the determination of the MTF of digital radiographic systems. Phys. Med. Biol. 50 3613-25 [6] Sones R A and Barnes G T 1984 A method to measure the MTF of digital x-ray systems. Med. Phys. 11 166-71 [7] Droege R T 1982 A practical method to measure the MTF of CT scanners Med. Phys. 9 758–760 [8] Morishita J, Doi K, Bollen R, Bunch P C, Hoeschen D, Sirand-Rey G and Sukenobu Y 1995 Comparison of two methods for accurate measurement of modulation transfer functions of screenfilm systems Med. Phys. 22 193–200 [9] Gonz´ alez-L´ opez A and Ruiz-Morales C 2015 Technical Note: MTF determination from a star bar pattern image. Med. Phys. 42 5060-5 [10] Gonz´ alez-L´ opez A, Campos-Morcillo P A and Lago-Mart´ın J D 2016 Technical Note: An oversampling procedure to calculate the MTF of an imaging system from a bar-pattern image. Med. Phys. 43 5653–8 [11] Bracewell R N 1978 The Fourier Transform and its Applications, 2nd ed (McGraw-Hill, Toronto)
Higher order harmonics in MTF calculations
13
[12] Joint Committee for Guides in Metrology (JCGM) 2008 Evaluation of measurement data: Guide to the expression of uncertainty in measurement [13] Rose A 1974 Vision (Boston, MA: Springer US) [14] Burgess A E 1999 The Rose model, revisited. J. Opt. Soc. Am. A. Opt. Image Sci. Vis. 16 633-46