Filters All will be made clear Bill Thomson, City hospital Birmingham

Preview:

Citation preview

Filters

All will be made clear

Bill Thomson , City hospital Birmingham

Familiar Fourier Facts

a n1

LL

L

xf x( ) cosn xL

d

a 0

21

n

a n cosn x

Lb n sin

n xL

=

b n1

LL

L

xf x( ) sinn xL

d

F [g(s)*h(s)] = F [g(s)] x F [h(s)]

Fundamental convolution theorem

Question?

What is Butterworth?

80p a pound !!? ? ? ?

Filters

• Simple overview only

• No Maths

• What is Butterworth?

• Why Frequency? - Fourier

(Well , only a little!)

Use 1D profile data

0 20 40 60

pixels

counts

profile

Who to blame? Fourier

Jean Baptiste Joseph Fourier Auxerre , 1768 - 1830 nearly became a priest studied with Lagrange , Laplace arrested twice, nearly guillotined scientific adviser to Napoleon in Egypt theory of heat transfer used series of

sines , cosines 15 years before accepted and published

Fourier analysis

Represent a function by sums of sin and cos terms

easier maths

need to consider frequencies

sines and cosines

A

wavelength

A = size (amplitude)

Wavelength = distance (cm , pixels etc)

frequency = 1 / wavelength (cm-1 , pixels-1)

Amplitude = same

wavelength = 1/2

frequency = double

A

wavelength

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

1st harmonic

Count Profile - Fourier fit

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 1 harmonic

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

2nd harmonic

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 2 harmonics

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

3rd harmonic

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 3 harmonics

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

4th harmonic

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 4 harmonics

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

co

un

ts

8th harmonic

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 8 harmonics

Amplitude - Frequency plot

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

1st harmonic

0

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1

amp

litu

de

amp . freq

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

2nd harmonic

0

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1

amp

litu

de

amp . freq

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

3rd harmonic

0

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1

amp

litu

de

amp . freq

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

co

un

ts

8th harmonic

0

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1

amp

litu

de

amp . freq

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data

What Happens to Noisy Data?

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data

0

40

80

120

160

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 3 harmonics

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data 8 harmonics

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixelsc

ou

nts

8th harmonic

-40

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data

-4

-3

-2

-1

0

1

2

3

4

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1am

plit

ud

e

amp . freq

Power Spectrum

Normally plot (Amplitude)2 against frequency , on log scale

-4

-3

-2

-1

0

1

2

3

4

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1am

plit

ud

e

amp . freq

0

40

80

120

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

pixels

cou

nts

profile data

Tomography back projection

Blurring of back projection

Each true count is ‘blurred’ by 1/r function

X Y Z( )

How can we remove the 1/r blurring?

True data ‘blurred’ by 1/r = Back projection data

taking Fourier transform, F

‘blurring’ becomes simple multiplication

F (1/r) becomes 1/

so converting to Fourier , F i.e. in frequency terms

F(true data) x 1/ = F(back projection data)

F(true data) = F(back projection data) x

Ramp Function

F(true data) = F(back projection data) x

0

0.2

0.4

0 0.1 0.2 0.3 0.4 0.5

frequency - pixels-1

am

pli

tud

e

Problem !Amplifies higher frequencies

Noise at higher frequencies

Need to stop at a frequency which contains most signaland little noise

In theory , all done!

Butterworth Filter

Used to ‘cut-off’ the ramp effect

has two components -

order

cut-off

Butterworth Settings

Butterworth Filter

Butterworth cut-off 0.3

0

0.2

0.4

0.6

0.8

1

1.2

0 0.2 0.4 0.6

Frequency

order 3 order 6 order 9 order 12

Butterworth order 6

0

0.2

0.4

0.6

0.8

1

1.2

0 0.2 0.4 0.6

Frequency

0.25 0.3 0.35 0.4

Wiener Filter

Restorative filter amplifies mid range

frequencies depends on resolution (MTF)

and noise must have MTF file for

isotope and collimator factor ‘tweaks’ noise

component trust computer selection!

MTF()

MTF() 2 + 1/SNR()

SNR()=Object power

Noise power x multiplier

Maximum cut-off ?

data sample at 2x highest freq in the data pixel is smallest sample so, freqmax = 0.5 pixel-1

highest freq in patient data 1 cm-1

sample at 2cm-1 , pixel size 5mm

64x64 = 8mm 128 x128 = 3.6mm

• Sample = FWHM / 3 • resolution 15 - 18mm• sample at 5 - 6 mm

Automatic Filter

Uses power spectrum

10% noise means ‘rejects’ 90% of noise

based on analysis of four images

suggest use it for most clinical imaging

Software Revision

128 x 128 Butterworth , power spectrum changed

Spatial Frequency (cycles/ pixel) Spatial Frequency (cycles/ 2pixels)

Resolution effects

Resolution depends on

detector resolution

cut-off frequency of filter

if filter cutoff is low , filter determines resolution

Tomographic Noise

Cannot ignore noise in samplingNot simple ‘Poisson’ - complexproportional to

square root of cts per pixel (N) 1/2

fourth root of total pixels (P) 1/4

for the same ‘signal to noise’improve spatial resolution by 2counts must increase by 8

Bone images

Wiener Butterworth

Heart Images

Butterworth filter Wiener filter

2D Fourier

2D Filter of a Duck

2D Fouriertransform

Inverse Fourier

Partial Volume Effect

=FWHM x2x0.5

Cylinder phantom

low pass Wiener

Phantom Study

Two holes separated by diameter

‘building blocks’ join together

fill with Tc99m , tomo scan in water8mm 9mm 10mm 11mm 12mm 13mm

Twin hole phantom

Wiener Best ButterworthCut –off 0.45 pixel-1

Poor ButterworthCut off 0.26 pixel-1

Multi Hole Phantom

Hi-res coll

Butterworth

Gen purpose

Butterworth

Hi-res

Wiener

Heart phantom Study

Conclusions

Filter choice still very user dependent

essentially a balance of noise / detail

frequency needed for the maths behind the scenes

check if cycles/cm , cycles/pixel , cycles/(2 pixels)

higher frequencies needed for detail / resolution

Remember partial volume effect

Recommended