Revision as of 10:00, 11 July 2013 by Mhossain (Talk | contribs)

sLecture

Topic 3: Magnetic Resonance Imaging


The Bouman Lectures on Image Processing

A sLecture by Maliha Hossain

Topic 3: Magnetic Resonance Imaging

© 2013




Excerpt from Prof. Bouman's Lecture


Accompanying Lecture Notes


Magnetic resonance imaging (MRI or MR) is a medical imaging technique that uses the property of nuclear magnetic resonance. We will see later in greater detail that magnetic fields are applied to manipulate the precession of nuclei within the patients body. As they return to their previous states, they emit a signal that can be decoded into a map.

There is, in principal, no upper bound to how high the resolution can be of images produced using MRI. It would of course take a long time to perform such a scan. Generally scans have a spatial resolution in the order of millimeters.

Another advantage of MRI is that it uses no ionizing radiation unlike CT. Additionally, MR is very flexible and programmable. It is basically a software programmable module. MR is however about twice as expensive as CT. One of the reasons it is expensive is that it is slower than CT. The machine itself is also acoustically noisy, which can be uncomfortable for the patient and can interfere with your measurements if for example you are trying to image the part of the brain that is stimulated by sound.


Fig 1: The exterior of an MRI scanner


Fig 2: MRI scan of a patient



MRI Attributes

  • Based on magnetic resonance effect in atomic species
  • Does not require any ionizing radiation
  • Numerous modalitites
    • Conventional anatomical scans
    • Functional MRI(fMRI)
    • MRI Tagging (tagging makes it possible to capture and store information about the motion of an organ, often of the heart)
  • Image formation
    • RF excitation of magnetic resonance modes
    • Magnetic field gradients modulate resonance frequency
    • Reconstruction computed with inverse Fourier transform
    • Fully programmable
    • Requires an enormous (and very expensive) superconducting magnet
Fig 3: fMRI scan of a patient's brain. It shows the regional cerebral blood volume (rCBV). Different colors indicate different levels of activity in the brain.



Magnetic Resonance

Larmor precession is the precession of the magnetic moments of atoms or their particles about an external magnetic field.

You put a muclear species that has a magnetic dipole in the presence of a magnetic field and this will cause the particle spin to precess about the external field axis much like how a top spins about its axis. This phenomenon is depicted in figure 1.


Fig 4: Precession of atom in the presence of a magnetic field

An atom or its nuclei will precess at the Larmor frequency, given by
$ \omega_0 = LM \ $
where
$ M $ is the magnitude of the ambient magnetic field in Teslas (T)
$ \omega_0 $ is the frequency of precession in radians per second
$ L $ is the gyromagnetic constant known as the Larmor constant and its value depends on the choice of atom. L has units of radians per second per Tesla (rad/(sT))

Simplified explanation of the physics. full explanation is beyond the scope of the lecture since it will mainly deal with the signal process aspect of MRI

Typically, MR scans are done with hydrogen although it does not have to be. most MRI scanners are designed (center frequencies are set up) to scan hydrogen because hydrogen ions, which are just protons, are so abundant in our bodies. the frequency of oscillation of hydrogen in the presence of a magnetic field of 1.5 T is about 63.87 MHz. designed for particular nucleus species. Larmor constant is unique to each. so the frequency of oscillation is intrinsic to a nuclear species in a given magnetic field. so the scanner has to designed around a particular $ \omega_0 $ depending on which nucleus you are imaging.

Larmor frequency of the detected signal is proportional to the applied magnetic field, changing the magnitude of that field produces a different detected frequency. Placing a magnetic field gradient across a sample allows you to locate the source of the proton nuclear magnetic resonance (NMR) signal in the sample. This is used to great advantage in the medical imaging process known as Magnetic Resonance Imaging

precessing in uniform magnetic field. (you pump energy into the system using an RF signal and the particles the oscillate with the radio frequency as long as the RF signal is at the center frequency of the precessing nuclei. once you turn it off, the precessing particle will radiate an RF signal. You can locate the source of the proton by detecting the RF signal.

You transmit an RF signal at 63.87 MHz into the material and it will cause the atoms to precess. you basically pump energy into it. and the way to describe that is that the tip angle increases. and if you remove the excitation signal, the atoms will radiate RF pulses at the same center frequency. this is the underlying phenomena used to perform MRI.



The MRI Magnet

Fig 5: The MRI magnet

Traditional MR scanners use very high field strengths. 1.5 T and 3 T are standard magnetic field strengths used in MRI are needed to produce high quality images reliably. patients are required to remove clothing items that may contain ferromagnetic materials. most patients with metallic implants such as pacemakers cannot have an MRI done.

You have a large superconducting magnet built around the bore of the scanner. At very low temperatures, close to absolute zero, the superconducting material has zero resistance. A current is passed through the material using a generator. The current continues to pass through it even after the generator is turned off since the material has no resistance as long as the superconducting material is kept below its critical temperature by the liquid helium

this perpetual current flow comes at the cost of having to keep the helium cool. An accidental shut-down of the system can trigger an event known as "quench", which involves the rapid boiling of the liquid helium from around the superconducting material. As the temperature rises the magnet develops a resistance and even a small resistance can cause the material to heat up due to the presence of high currents. This will speed up the boiling of the helium even more. If the rapidly expanding helium cannot be dissipated, it may be released into the scanner room, maybe even at an explosive rate. Therefore rooms with scanners must be equipped to handle such an event.

has to be in a bath of liquid helium to keep it cool

  • Large superconducting magnet
    • Uniform field within bore
    • Very large static magnetic field $ M_0 $

For the remainder of the notes, we will assume the scanner is designed such that $ M_0 = 1.5T $ to image hydrogen ions precessing at 63.8 MHz.



Magnetic Field Gradients

assume that the direction of the magnetic field within the bore is constant and only its magnitude is changing. This allows us to treat it as a scalar quantity even though in reality it is a vector.

  • Magnetic field magnitude at the location $ (x,y,z) $ has the form

$ M(x,y,z) = M_0 + xG_x + yG_y + zG_z \ $
- $ G_x $, $ G_y $ and $ G_z $ control magnetic field gradients
- $ M_0 $ is constant. The top sketch visualizes an NMR process with a constant magnetic field applied to the entire sample. The hydrogen spin-flip frequency is then the same for all parts of the sample. then you add gradient coils that introduce a variable magnetic fields that are controlled using amplifiers. they're like coils you can use in speakers. recall from Ampere's law that the magnetic field around an electric current is proportional to the current. The coils are designed so that the magnetic field changes approximately linearly with position, hence the term gradient field.

for the inductance $ L $ in the coil, we know that
$ L\frac{di}{dt} = v(t) $
the magnetic field $ M(t) $ is proportional to the current, it is also proportional to the integral of the voltage
$ M(t) = \int v(\tau)d\tau $ so the amplifier that drives the current through the coil is controlled by a voltage where the current through the coil is proportional to the integral of the voltage and the magnetic field of the coil is proportional to the current.

So you have the static uniform magnetic field $ M_0 $ produced by the superconducting magnet. add to this the gradient magnetic field that varies linearly with space. the gradient field is produced by a current through a coil driven by an amplifier.

- Gradients can be changed with time
- Gradients are small compared to $ M_0 $

  • For the time varying gradients,

$ M(x,y,z,t) = M_0 + xG_x(t) + yG_y(t) + zG_z(t) \ $

The three coils produce gradients along $ x $, $ y $ and $ z $ (left to right, top to bottom and head to toe respectively). and each of those coils control the magnetic field gradient along its respective axis. So by varying the current through each of those three coils, the gradient field can be varied along each axis.



MRI Slice Select

Let us consider the $ z $ axis along the bore. The graph for $ M $ versus $ z $ is a straight line with gradient $ G_z<\math> so as you move from the toes towards the head, the magnetic field increases. Now if you send an RF pulse at 63MHz to excite protons inside the patients body but only for those where the resonant frequency matches the RF frequency. [[Image:intro_fig4.jpeg|400px|thumb|left|Fig 6: MRI slice select]] as shown in the figure, the magnetic field is equal to M_0 at <math>z = 0 $. therefore, the protons on this plane have precession frequency 63MHz. These protons will resonate with the RF pulse that is transmitted at 63MHz. By varying the frequency of the RF pulse, you could stimulate protons from different slices along the z-axis to precess. in this manner you could specify which slice to stimulate, hence the term slice select.

Design RF pulse to excite protons in single slice
- Turn off $ x $ and $ y $ gradients
- Set $ z $ gradient to fix positive value, $ G_z > 0 $
- Use the fact that resonance frequency is given by
$ \omega = L(M_0+zG_z) $

RF is not much attenuated by the patients body.

at each position, the atoms are tuned to a different frequency.



Slice Select Pulse Design

so if you took the fourier transform of the RF pulse, that would give you the shape of the response you would get "here" (in the slice?) If this is a sinc function in time modulated at 63.8 MHz, then you would get a slice that is rectangular in frequency and the width of the rectangle is. and the width of the rectangle depends on the width of the sinc. the width of a sinc determines the width of a slice where a wider sinc produces a narrower slice.

You would want to gather a sequence of slices that fit next to each other to build up a 3 dimensional representation of the volume.

  • Design parameters
    • Slice center$ = z_c $
    • Slice thickness $ = \Delta z $
  • Slice centered at $ z_c $ ⇒ pulse frequency

$ f_c = \frac{LM_0}{2\pi}+\frac{z_cLG_z}{2\pi} = f_0 + \frac{z_cLG_z}{2\pi} $

  • Slice thickness $ \Delta z $ ⇒ pulse bandwidth

$ \Delta f = \frac{\Delta z LG_z}{2\pi} $

  • Using the parameters. the pulse is given by

$ s(t) = e^{j2\pi f_ct}sinc(t\Delta f) $

and its CTFT is given by
$ S(f) = rect(\frac{f-f_c}{\Delta f}) $



Imaging the Selected Slice

Fig 6:
  • Precessing atoms radiate electromagnetic energy at RF frequencies
  • Strategy
    • Vary magnetic gradients along $ x $ and $ y $ axes
    • Measure received RF signal
    • Reconstruct image from RF measurements

after you've sent the pulse, the excited protons will re-radiate RF as they relax. pick up on antenna. how do you form an image from this signal because otherwise you receive the entire signal over the entire volume but that doesn't give you much information.



Signal from a Single Voxel

Let us first look at the signal received from one voxel. then we can look at the signal we would get from adding all the voxels together.

so in our coordinate system,this voxel is of size $ dxdydz $ and then we will integrate them all together to get the total signal we receive at the antenna.

Fig 6: Signal from a single voxel

assume that we have selected a slice on the $ z $-axis so the received signal is a function of $ x $, $ y $ and time. RF signal from a single voxel has the form
$ r(x,y,t) = f(x,y)e^{j\phi(t)} \ $

$ f(x,y) $ voxel dependent weight

  • Depends on properties of material in voxel
  • Quantity of interest
  • Typically "weighted" by T1, T2, or T3*

$ \phi(t) $ phase of received signal. this is the phase due tho the fact that you've changed the linear gradients at this point. the real part of $ f(x,y)e^{j\phi(t)} $ is what you receive in the signal but it is standard to include the expression for phase in a modulated signal. modulation is when you multiply with a sinusoidal carrier that can be expressed as an exponent.

  • The phase can be modulated using $ G_x $ and $ G_y $ magnetic field gradients. you could pinpoint a single voxel in a slice this way. If the voxel is at $ (z=z_0, x=0, y=0) $ changing the gradient will not matter but elsewhere in the slice, it will matter.
  • WLOG, we assume that $ \phi(0) = 0 $. in doing do, we absorb any complex constant into $ f(x,y) $ so that $ f(x,y) $ can be a complex number.

By changing the gradient along $ x $ and $ y $, I can change the oscillation frequency of that voxel.

for a signal given by $ e^{j\phi(t)} $, the phase is given by $ \phi(t) $. the instantaneous frequency $ f(t) $, is the derivative of the phase i.e.
$ \begin{align} f(t) &= \frac{d\phi(t)}{dt} \\ \Rightarrow \phi(t) &= \int_{-\infty}^t f(\tau) d\tau \end{align} $



Analysis of Phase

recall that the oscillation frequency is given by $ \omega_0 = LM $. and since instantaneous frequency is the time derivative of phase, we have that
$ \begin{align} \frac{d\phi(t)}{dt} &= LM(x,y,t) \\ \Rightarrow \phi(t) &= \int_0^t LM(x,y,\tau)d\tau \\ &= \int_0^t LM_0 + xLG_x(\tau) + yLG_y(\tau)d\tau \\ &= \omega_0t + xk_x(t) +yky(t) \end{align} $

where we define
$ \omega_0 = LM_0 $
$ k_x(t) = \int_0^t LG_x(\tau)d\tau $
$ k_y(t) = \int_0^t LG_y(\tau)d\tau $

RF signal from a single voxel has the form
$ \begin{align} r(t) &= f(x,y)e^{j\phi(t)} \\ &= f(x,y)e^{j(\omega_0t + xk_x(t) + yk_y(t))} \\ &= f(x,y)e^{j\omega_0t}e^{j(xk_x(t) + yk_y(t))} \end{align} $

Note that the $ \phi(t) $ is not expressed as a function of $ z $. This is because we have restricted ourselves to one slice on the $ z $ axis so in this analysis, the value of $ z $ does not vary.



Received Signal from Voxel

from the above analysis of phase, we have that the received RF signal from a single voxel is given by
$ \begin{align} r(t) &= f(x,y)e^{j\phi(t)} \\ &= f(x,y)e^{j(\omega_0t+xk_x(t)+yk_y(t))} \\ &= f(x,y)e^{j\omega_0t}e^{j(xk_x(t)+yk_y(t))} \end{align} $

where $ e^{j\omega o(t)} $ is the carrier and $ e^{j(xkx(t)+yky(t))} $ is the phase modulation on the carrier. In order to demodulate the signal in the receiver, the signal $ r(t) $ is fed into a mixer where it is multiplied with the reciprocal of the carrier and you are then left with the image multiplied with the phase modulator as shown in figure 7.

Fig 7: Demodulating $ r(t) $



Received Signal from Selected Slice

RF signal from the complete slice is given by the contribution from all the voxels in that slice so we integrate over $ x $ and $ y $ to get
$ \begin{align} R(t) &= \int_{\mathbf{R}}\int_{\mathbf{R}}r(x,y,t)dxdy \\ &= \int_{\mathbf{R}}\int_{\mathbf{R}} f(x,y)e^{j\omega_0t}e^{j(xk_x(t) + yk_y(t))}dxdy \\ &= e^{j\omega_0t}\int_{\mathbf{R}}\int_{\mathbf{R}} f(x,y)e^{j(xk_x(t) + yk_y(t))}dxdy \\ &= e^{j\omega_0t}F(-k_x(t),-k_y(t)) \end{align} $

where $ F(u,v) $ is the CSFT of $ f(x,y) $, $ u = -k_x(t) $ and $ v = -k_y(t) $

So we have that the demodulated received signal $ R(t)e^{-j\omega ot} $ is the Fourier transform of the object evaluated at $ -k_x(t) $ and $ -k_y(t) $.



K-Space Interpretation of Demodulated Signal

k refers to the wave number.

Demodulating the RF signal from the complete slice, we get
$ F(-k_x(t),-k_y(t))=R(t)e^{j\omega_0t} $

where
$ k_x(t) = \int_0^t LG_x(\tau)d\tau $
$ k_y(t) = \int_0^t LG_y(\tau)d\tau $

Strategy

  • Scan partial frequencies by varying $ k_x(t) $ and $ k_y(t) $
  • Reconstruct image by performing the (inverse) CSFT
  • $ G_x(t) $ and $ G_y(t) $ control velocity through K-space



Controlling K-Space Trajectory

Relationships between gradient coil voltage and K-space
$ \begin{align} L_x\frac{di(t)}{dt} &= v_x(t) \quad G_x(t) = M_xi(t) \\ L_y\frac{di(t)}{dt} &= v_y(t) \quad G_y(t) = M_yi(t) \end{align} $
where $ v_x(t) $ and $ v_x(t) $ are the voltage across the respective coils and $ L_x $ and $ L_y $ are their respective inductances.

using this result, we get
$ \begin{align} k_x(t) &= \int_0^t LG_x(\tau)d\tau \\ &= \frac{LM_x}{L_x}\int_0^t\int_0^{\tau}v_x(s)dsd\tau \\ k_y(t) &= \int_0^t LG_x(\tau)d\tau \\ &= \frac{LM_y}{L_y}\int_0^t\int_0^{\tau}v_y(s)dsd\tau \end{align} $

$ v_x(t) $ and $ v_y(t) $ are like the accelerator peddles for $ k_x(t) $ and $ k_y(t) $ in the professors force-displacement analogy and $ G_x(t) $ and $ G_y(t) $ are like analogous to velocity. This concept is further illustrated in figure 8.

Assume that a particle is at rest at position $ (x=0,y=0) $ on the grid shown in figure 8. A negative acceleration pulse is applied along the $ x $-axis and a positive acceleration pulse is applied along the $ y $-axis, so that the particle travels to the top left corner of the grid. The particle is brought to a stop with another pulse in the opposite direction. Next a pulse is applied along the positive $ x $-axis and the particle travels to the top right of the grid, where it is stopped and made to travel downward due to a negative acceleration along the $ y $-axis. The pulses are applied so that the particle travels from the top left to the bottom right corner of the grid in a serpentine path. The full sequence is illustrated in figure 8. but really acceleration is an analogy for voltage and the velocity is an analogy for $ G_x(t) $ and $ G_y(t) $. and the serpentine path traced out on the grid is really the sequence in which portions of the slice resonate with the rf pulse. the voltage waveforms required to trace such a path are shown in figure 7 (d) and (e).




Echo Planar Imaging (EPI) Scan Pattern

Fig 7: A commonly used raster scan pattern through K-space

$ \begin{align} k_x(t) &= L\int_0^t G_x(\tau)d\tau = \frac{LM_x}{L_x}\int_0^t\int_0^{\tau} v_x(s)dsd\tau \\ k_y(t) &= L\int_0^t G_y(\tau)d\tau = \frac{LM_y}{L_y}\int_0^t\int_0^{\tau} v_y(s)dsd\tau \end{align} $



==Gradient Waveforms for EPI</math>

Fig 8: Gradient waveforms in $ x $ and $ y $
Fig 9: Voltage waveforms in $ x $ and $ y $




References

  • C. A. Bouman. ECE 637. Class Lecture. Digital Image Processing I. Faculty of Electrical Engineering, Purdue University. Spring 2013.
  • G. Francis. Psy 200. "Introduction to Cognitive Psychology". Class Lecture Notes. Faculty of Psychological Sciences, Purdue University. Spring 2013.



Questions and comments

If you have any questions, comments, etc. please post them on this page



Back to the "Bouman Lectures on Image Processing" by Maliha Hossain

Alumni Liaison

Ph.D. on Applied Mathematics in Aug 2007. Involved on applications of image super-resolution to electron microscopy

Francisco Blanco-Silva