Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 ›...

29
Principles of Magnetic Resonance Imaging Lesson 3 Alessandro Sbrizzi University Medical Center Utrecht [email protected] Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Transcript of Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 ›...

Page 1: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Principles of Magnetic Resonance Imaging

Lesson 3

Alessandro Sbrizzi

University Medical Center [email protected]

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 2: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Summary of the previous lesson

Boxcar and sinc function:

F 1

2TΠT (ω) = sinc(2Tω)

Dirac delta:

δν ≡ 0 if x 6= ν, and

∫ +∞

−∞δν(x)dx ≡ 1 F(δν)(ω) = e−2πiνω

Convolution and convolution theorem:

f ∗ g(x) ≡∫ +∞

−∞f (x − x ′)g(x ′)dx ′, F(f ∗ g) = F(f )F(g)

k-space and MRI image reconstruction

σ(~k) =

R2

ρ(~r )e−2πi~k·~rd~r , with ~k(t) ≡ γ

∫ t

0

~G(τ)dτ

⇒ ρ(~r ) =

R2

σ(~k)e2πi~k ·~rd~k

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 3: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

k-space signal and the human body

The MRI imaging equation:

σ(~k) =

R2

ρ(~r)e−i2π~k ·~rd~r

with ~k(t) ≡ γ2π

∫ t

0~G(τ)dτ

⇒ ρ(~r ) =

R2

σ(~k)e i2π~k ·~rd~k

From the previous lecture we saw how a function of finitebandwidth lasts forever (example: sinc function, whose FT is theboxcar)

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 4: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Stopping the scan after a certain time...

Thus, the k-space signal of a human body lasts forever since its(inverse) Fourier transform (i.e. the human body) has finitesupport.First problem We measure data in the k-space, we need truncateit (otherwise the scan would last forever)

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 5: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Providing data to the computer

The (inverse) Fourier Tansform integral is analytically solvable onlyfor some simple mathematical functions. In reality, the humanbody does not look that nice (in a mathematical sense). Toreconstruct the real image, we need a numerical recipe to computethe Fourier Transform, and this is achievable only if we provide thecomputer with a finite number of data points taken at particularlocations in the k-space. This lead to:Second problem We need a strategy to discretize the k-space atlocations such that the numerical Fourier Transform will give usefulreconstruction.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 6: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Fourier Series. Discretization (GS.5.1)

Suppose f is T -periodic, then the Fourier series and coefficientsare:

f (t) =∞∑

k=−∞γk(f )e

2πit kT with γk ≡ 1

T

∫ T

0f (t)e−2πit k

T dt

Approximate γk by a Riemann sum.Suppose we know only the N sample values fn ≡ f (n∆t), with∆t = T/N and n = 0, . . . ,N − 1. Then:

γk ≡ 1

T

N−1∑

n=0

∆t f (n∆t)e−2πin∆tk/T =

1

N

N−1∑

n=0

fne−2πink/N

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 7: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Approximation of the Fourier coefficients (GS.5.1)

γk ≡ 1

T

∫ T

0f (t)e−2πit k

T dt, γk ≡ 1

N

N−1∑

n=0

fne−2πink/N

Note that the oscillations e2πink/N and e2πin(k+N)/N coincide, thus

γk = γk+N

This phenomenon is called aliasing.Error bound: |γk − γk | ≤

j 6=0 |γk+jN |. The error can be verysmall if f is smooth (quickly decaying γk+jN).To calculate high-order Fourier coefficients we need large N thusthe sample points have to be close. The higher the order, thecloser the sample points.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 8: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Example of DFT, approx error and aliasing (GS.5.1)

f (t) = (t2 − 1) cos2(10πt) on [−1,+1] periodically extended(T = 2).

t-3 -2 -1 0 1 2 3

-1

-0.9

-0.8

-0.7

-0.6

-0.5

-0.4

-0.3

-0.2

-0.1

0f(t)

Figure: Graph of f .

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 9: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Example of DFT, approx error and aliasing (GS.5.1)

f (t) = (t2 − 1) cos2(10πt) on [−1,+1] periodically extended(T = 2).

Figure: Exact, γk , and discrete, γk , Fourier coefficients. µk ≡ log10 γk ,µdk ≡ log10 γk . ǫk = γk − γk . N = 100. Figure from GS, page 50.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 10: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Inversion theorem for discrete Fourier transform (GS.5.2)

From last week: the functions e2πikt/T , with k ∈ Z, form anorthonormal system for the T -periodic functions.Analogousy, the vectors φn ∈ C

N with φn(k) ≡ 1√Ne2πikn/N and

n = 0, . . . ,N − 1, form an orthonormal basis for all vectors in CN .

Thus, for each vector f in CN :

fm =

N−1∑

k=0

(f , φk)φk(m) =

N−1∑

k=0

1√N

N−1∑

n=0

fne−2πink/N 1√

Ne2πimk/N =

=

N−1∑

k=0

γke2πi mk

N

γk ≡ 1

N

N−1∑

n=0

fne−2πink/N ⇒ fn =

N−1∑

k=0

γke2πi nk

N

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 11: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Discrete Fourier Transform: definition

Given a sequence (fn) ∈ CN with n = 0, . . . ,N − 1,

the Discrete Fourier Transform (DFT) of (fn) is the sequence(fk) ∈ C

N with k = 0, . . . ,N − 1 defined by

fk ≡ 1

N

N−1∑

n=0

fne−2πi nk

N

Vice versa, the Inverse Discrete Fourier Transform (DFT−1) of (fk)is the sequence (fn) defined by

fn ≡N−1∑

k=0

fke2πi nk

N

Note: DFTDFT−1f k=(fk) and DFT−1DFTf n = (fn)

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 12: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Two-dimensional DFT

(fn,m) ∈ CN×M with n = 0, . . . ,N − 1 and m = 0, . . . ,M − 1

fk,h ≡ 1

NM

N−1∑

n=0

M−1∑

m=0

fn,me−2πi nk

N e−2πi mhM (DFT)

(fk,h) ∈ CN×M with k = 0, . . . ,N − 1 and h = 0, . . . ,M − 1

fn,m ≡N−1∑

k=0

M−1∑

h=0

fk,he2πi nk

N e2πimhM (DFT

−1)

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 13: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

DFT for non periodic functions (GS.5.4)

f (ω) =

∫ ∞

−∞f (t)e−2πitωdt and f (t) =

∫ ∞

−∞f (ω)e+2πitωdω

To compute the Fourier Transform we must perform twoapproximation steps:

Truncation. Assume f is small outside [0,T ]

⇒ f (ω) =

∫ ∞

−∞f (t)e−2πitωdt ≈

∫ T

0f (t)e−2πitωdt

Discretization. Set ∆t ≡ T/N, N the number of samplepoints, ωk ≡ k/T (k ∈ Z) and tn ≡ n∆t

⇒ f (ωk) =

∫ T

0f (t)e−2πitωkdt ≈

N−1∑

n=0

∆t f (tn)e−2πitnωk

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 14: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

DFT for non periodic functions (GS.5.4)

f (ωk) ≈N−1∑

n=0

∆t f (tn)e−2πitnωk = T

(

1

N

N−1∑

n=0

f (tn)e−2πi nk

N

)

Similarly:

f (tn) ≈1

T

(

N−1∑

k=0

f (ωk)e2πi nk

N

)

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 15: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

DFT for non periodic functions (GS.5.4)

The Fourier transform (frequency-domain) can beapproximated by DFT from the sample points in time domaintn = nT/N.

The inverse Fourier transform (in time-domain) can beapproximated by the inverse DFT from the sample points infrequency domain ωk = k/T .

N is the number of sample points and T is the size of thetruncation interval (supposed to start at 0).

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 16: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

The Nyquist criterion (GS.5.4)

f (ωk) = f (ωk+N) (aliasing)

there are N interesting, equispaced sample points in both timeand/or frequency domain

the spacing is ∆t = T/N in time-domain and ∆ω = 1/T infrequency domain

The size of the time-domain interval gives the spacing infrequency-domain

The spacing in time-domain, ∆t gives the size of thefrequency-domain interval ωN − ω0 = N∆ω = N/T = 1/∆t

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 17: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

The Nyquist criterion (GS.5.4)

time-domain frequency-domainInterval size T 1/∆t = N/T

sampling spacing ∆t = T/N 1/T

And analogously:

frequency-domain time-domainInterval size Ω 1/∆ω = N/Ω

sampling spacing ∆ω = Ω/N 1/Ω

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 18: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Nyquist criterion in MRI

Translate to MRI:

Image-domain k-spaceInterval size L 1/∆s = N/L

sampling spacing ∆s = L/N ∆k = 1/L

∆s is called the spatial resolution (assume equal in bothdirections)

L is the Field of View (assume equal in both directions)

Nyquist tells us: Given an object of size L× L. To have anuseful reconstruction of it at a given spatial resolution ∆s , weneed to sample the k-space over a 1

∆s× 1

∆sinterval at steps

of 1/L.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 19: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Nyquist criterion in MRI

In MRI, the most relevant (largest amplitude) spatial frequencycoefficients are distributed around the origin of the k-space.The sampling domain is centered at ~k = (0, 0): [−kmax, kmax] (or[−kmax, kmax −∆k ] when N is an even number).

kmax =1

2∆s

and ∆k =1

L

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 20: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Nyquist criterion in MRI

Some facts to keep in mind:

we are still working with approximations due to truncation anddiscretization of the k-space signal.

DFT and Nyquist show how to obtain a good approximate

for the true image

Thus: DFT and FFT provide an (efficient) way to invert the

signal equation, while the Nyquist criterion provides a recipeto correctly acquire the data.

If the Nyquist criterion is not fulfilled, the additional error onthe image is called alias and it usually has structure, thuseasy recognizable. This fact is very important in clinical

practice.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 21: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Shift and convolution theorems

f , g are sequences of N complex numbers, a ∈ Z, and f (a) is the

sequence defined as: f(a)n = fn−a.

f and g periodically extended: fℓ+N = fℓ and gℓ+N = gℓ (∀ℓ ∈ Z)Analogously to the continuous case:Shift theorem:

DFTf (a)k = DFTf ke−2πiak/N

Definition of the discrete convolution:

f ∗ g(n) ≡N−1∑

n′=0

fn−n′gn′

Convolution theorem:

DFTf ∗ g = DFTf DFTg

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 22: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Numerical complexity of the DFT and Fast FT (GS.5.5)

fn ≡N−1∑

k=0

fke2πi nk

N

Soppose values of e2πinkN are available ⇒ N multiplications and

N − 1 additions to be repeated for all N values of f . Total:≈ 2N2

flops.For large values of N, computing DFT in this way becomesimpractical.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 23: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Fast Fourier Transform (GS.5.5)

Suppose we want to calculate fn ≡∑N−1k=0 αke

2πikn/N forn = 0, . . . ,N − 1. N even.

fn =

(

2k<N

α2ke2πi2kn/N

)

+

(

2k+1<N

α2k+1e2πi2kn/N

)

e2πin/N

fn =

(

M−1∑

k=0

α2ke2πikn/M

)

+

(

M−1∑

k=0

α2k+1e2πikn/M

)

eπin/M

fn+M =

(

M−1∑

k=0

α2ke2πikn/M

)

−(

M−1∑

k=0

α2k+1e2πikn/M

)

eπin/M

for n = 0, . . . ,M − 1 and M ≡ N/2. Note: using the fact thateπi(n+M)/M = −eπin/M :fn = An + Bne

πin/M and fn+M = An − Bneπin/M .

An and Bn are computed only for N/2 coefficients.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 24: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Fast Fourier Transform (GS.5.5)

The fn terms are computed by adding and subtracting sums ofM = N/2 terms.

If also M is even, this process can again be applied to eachone of those shorter Fourier sums (An and Bn).

If N is a power of 2 (set N = 2ℓ), the whole process can beapplied starting from the lowest level (N DFTs of just oneterm each, αk) to the highest one (N terms as shown).

This is the Fast Fourier transform (FFT) algorithm.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 25: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Numerical complexity of FFT(GS.5.5)

Suppose κj−1 is number of flops needed at the (j − 1)-th level.

Every time we step to a higher level (from 2j−1 to 2j terms ineach DFT) we need 2κj−1 flops for the An and Bn and 2j+1

flops for the multiplication by e2πin/2j

and the sum (orsubtraction) of An and Bn. Thus: κj = 2κj−1 + 2j+1.

Total amount of flops:κℓ = 2(κℓ−1 + 2ℓ) = 2(2(κℓ−2 + 2ℓ−1)) + 2ℓ+1 =22κℓ−2 + 2N + 2N = · · · = 2ℓκ0 + 2Nℓ = 2N log2 N

κ0 = 0 because no computations are needed for the DFT inthe lowest step.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 26: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Numerical complexity of FFT (GS.5.5)

The acceleration w.r.t. naive implementation is about2N2

2N log2 N= N/ log2 N.

Example: suppose N = 1024 = 210. Then acceleration isabout 100-fold!

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 27: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

2D DFT at equally spaced points

Signal samples from 2D k-space trajectories which followcartesian grid patterns can be assembled into a matrix A.

The 2D (inverse) DFT of A (i.e. the MRI image) can becalculated by successively applying the 1D (inverse) DFT twotimes: first to the column of A, then to the rows of theresulting matrix. Proof: exercise.

Conclusion: FFT algorithm can be applied to DFT’s of anydimension.

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 28: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Non-cartesian sampling. Example

Figure: Non-cartesian k-space sampling. ∆k is not equal over thek-space K

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3

Page 29: Principles of Magnetic Resonance Imaging Lesson 3 › ~zegel101 › ISC2017 › slides3.pdfAlessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3 Fourier Series. Discretization

Non-cartesian sampling. Nyquist

Assume that we wish to reconstruct an image with a field of viewL× L and ∆s ×∆s voxel size.In the previous sampling scheme, the distance betweenneighbouring k-space points is not constant. Still, we must samplewith a sufficiently fine resolution to avoid artifacts.Thus, we consider the maximum ∆k value:

maxK

∆k ≤ 1

L.

Note that we still have kmax =1

2∆s.

Question: Does the total number of voxels equal the total numberof k-space points?

Alessandro Sbrizzi Principles of Magnetic Resonance Imaging Lesson 3