Education, tips and tricks to help you conduct better fMRI experiments.
Sure, you can try to fix it during data processing, but you're usually better off fixing the acquisition!

Saturday, July 16, 2011

Physics for understanding fMRI artifacts: Part Eight

I had initially planned to go into 2D imaging next, but after some consideration I've decided instead to tidy up a few loose ends that follow more naturally from the last post: gradient-recalled echoes and slice selection. Then, in Part Nine I promise to introduce the second in-plane dimension. This route should better allow me to bring everything together at the end of the next handful of posts and permit you to see, and understand, the EPI pulse sequence at a glance. That's the plan. Let's see if we can make it work! (See Note 1.)

Gradient-recalled echoes

In the last post I used a frequency encoding gradient, also called a readout gradient (because it's on while the signal is being recorded, or read out), to produce one-dimensional images - profiles - of water-filled objects. This isn't the typical way that the signal is acquired, however. Instead, it is typical to acquire a refocused, or echoed, signal that has a certain symmetry in time in order to obtain some experimental benefits. I'll mention these benefits later. First, let's see how the gradient echo works.

Here is a simple gradient echo pulse sequence that is adapted from the simple readout gradient-only sequence that was considered in Part Seven:

The first thing to note is that the period of data acquisition (analog-to-digital conversion) has been delayed and now occurs in concert with a readout gradient having a negative sign, rather than being coincident with the positive gradient period labeled 1 in the figure. Also, the duration of data acquisition has been doubled. So instead of acquiring a free induction decay (FID) almost immediately after the 90 degree excitation pulse, we are now acquiring an echo signal at a later time. How and why does this echo form?

To understand the gradient echo let's consider just three spatial positions across the sample, as we did in the last post. As a reminder, here's the situation under the +Gx gradient:

Now let's consider what happens to magnetization residing at these three spatial positions during the time periods labeled 1, 2 and 3 in the pulse sequence shown above. During period 1 the situation (in the rotating frame) is the same as we saw in the last post: magnetization at position x1 begins to lag whereas magnetization at position x2 increases its precessional frequency, and so it moves ahead (below, left panel):

During period 2 in the pulse sequence the gradient's sign is reversed. Thus, magnetization at position x1 starts to precess at a faster rate than that at isocenter, whereas magnetization at x2 slows down. At the end of period 2 the three chunks of magnetization have realigned. This corresponds to the top of the echo signal. It's as if no gradient whatsoever had been applied to this point in time! All the phase shifts induced by the gradients (of either sign) have been cancelled out and the phase of the entire magnetization is zero at the end of period 2 (if we assume no other sources of phase shifts arising out of the sample itself).

By leaving the gradient -Gx enabled past the echo top, however, we see that magnetization at x1 continues to outpace the rest, placing it ahead of the pack during period 3. Likewise, magnetization at x2 is now the laggard. Throughout the process the magnetization at isocenter is unaffected.

Finally, it's important to note that gradient echoes can be applied in either order, i.e. negative or positive gradient episode first. All that matters, in fact, is that the net gradient over time becomes zero at some point. The negative and positive gradients don't have to happen in succession - they can be separated by some time period - and they don't even have to be the same shape! All that matters is that their areas are equal and opposite, to achieve cancellation of accrued phases. The point at which the negative and positive gradients cancel each other is defined as the top of the echo regardless of the timing or shape of the constituent gradients.

The benefits of acquiring a gradient echo

In principle, it is possible to use either half of the signal comprising the gradient echo, or to use the frequency-encoded FID signal following the RF excitation pulse (as in Part Seven), to produce a one-dimensional image of an object. This arises because of what's called the "Hermitian symmetry" of the signal. The two halves of the gradient echo have opposite phases and, ideally, contain equivalent spatial information, plus noise.

So, why do we bother to acquire a gradient echo rather than using a single Gx episode following the RF pulse? Increased signal and reduction of artifacts. The signal boost has two components. First, delaying the ADC period allows some time to switch the scanner electronics between 'transmit' mode and 'receive' mode. This isn't a huge problem with today's modern scanner electronics but in the early days of NMR and MRI these switches could take a long time (milliseconds). But even if the switch on the RF electronics takes only tens of microseconds we need to wait for a few hundred microseconds for the frequency-encoding gradient to ramp up, meaning that we lose the ability to acquire the first part of a FID. These omitted data points would have the largest signal amplitude, meaning we could be paying a disproportionately large signal penalty. The second boost to SNR comes from the redundancy of spatial information in the two halves of the gradient echo, whereas the noise in the two halves is different. Thus, we have a signal averaging effect from FTing the two halves together, netting (ideally) a sqrt(2) ~ 40% benefit in SNR, simply by extending the duration of signal acquisition by a little bit. (A typical readout period might last only a millisecond or two, so getting a 40% boost for such a tiny amount of time is a very good deal indeed!)

The other reason for using both halves of a gradient echo is to reduce artifacts. The Hermitian symmetry in the frequency-encoded information applies only when other phase shifts aren't hampering the experiment; we want just the phase shifts being induced by the readout gradient. But the presence of magnetic field imperfections arising from magnetic susceptibility differences, e.g. between sinuses and brain, motion, and other features of real samples means that in practice using just half of a gradient echo (or a FID signal directly) will produce images having more imperfections than is necessary. Again, for such a comparatively small investment of time - often less than a millisecond - we can simply acquire both halves of a gradient echo and do a much better job.

If you're interested in pulse sequence design and want to know when it might be useful to acquire less than the whole gradient echo, see these handy pages on Partial Echo from MR-TIP, a useful website for technical descriptions. Otherwise, don't worry about it. For 99.9% of fMRI experiments we acquire entire gradient echo signals. Furthermore, gradient echoes don't just appear in frequency encoding either. They have a wide range of uses, one of which appears in the next section. And when we get to the EPI pulse sequence you'll see that balancing positive and negative gradient episodes in a train of (gradient) echoes is the principal workhorse of the total spatial encoding scheme.

Slice selection

In Part Seven we made profiles of three-dimensional objects by conveniently orienting the frequency encoding gradient orthogonal to the long axis of axially symmetric shapes, thereby rendering a one-dimensional profile interpretable. That may be acceptable when one dimension is constant, such as the axis of a cylinder, but what if the cylinder had a bulb at the end, or a narrow waist? And what if it's not a cylinder at all, but a brain? It would greatly complicate interpretation of fMRI data if signal arose from the neck and shoulders in addition to the head, wouldn't you think? (fMRI skeptics have enough ammunition as it is.)

A solution to this issue is to restrict the extent of sampled magnetization in the third dimension via slice selection. This process is akin to electronically slicing up the subject into a near arbitrary number and thickness of slices. I say near arbitrary because there are practical limits, as you'd expect. (See Note 2.)

To achieve slice selection, we first need to select a suitable RF pulse that will excite a band, or notch, of frequencies. If we apply such an RF pulse in the presence of a magnetic field gradient, the combination of RF pulse and gradient will excite just a slab of magnetization rather than the entire object. That's because, as we have seen in this post and the last one, linear magnetic field gradients have the effect of spreading out frequencies with a (linear) spatial dependence, providing an easy correspondence between frequency and position along the gradient direction.

Before considering further the effect of the RF pulse in concert with a gradient, let's look in a little more detail at the RF pulse shapes that might be useful for slice selection. Fourier pairs are a good place to start. In Part Six we saw the sinc function and its Fourier pair, the boxcar function:

If the goal is a slab of excited frequencies with little to no effect outside of the slab, then the boxcar in the bottom-right corner of the above figure looks like it might fit the bill, eh? To get a frequency domain boxcar in 1D - which would correspond to a slab of magnetization in 3D - then all we need to do is modulate the amplitude of the RF excitation pulse so that it is sinc-like as it's played out in time. (See Note 3 if you need a refresher on RF pulses.) The frequency of the oscillating magnetic field pulse is still in the radiofrequency range, all we're doing is modulating its amplitude with the shape that we want, rather than simply turning the RF pulse on and off, as was done to achieve a "square" RF pulse earlier in this post and in Part Seven. (See Note 4.)

Now all that remains to be done is to spread out the magnetization across the sample in such a way that the boxcar's frequency bandwidth corresponds to a range of frequencies across the target region of interest. Let's say that we want to slice a cylinder into a succession of transverse slices. Then all we need to do is turn on the sinc-shaped RF pulse in the presence of a gradient along Z, the cylinder's axis, and then place the resulting boxcar at the frequency range corresponding to the location of the target slice (along Z):

If we want to change the slice thickness we have two options. Either we can change the duration of the sinc-shaped RF pulse (because it has an inverse relationship in the frequency domain, so that a longer sinc pulse excites a narrower frequency notch and vice versa), or we can change the gradient strength. If we double the slice select gradient (Gss) amplitude we will halve the slice thickness (keeping the RF pulse constant):

There is of course a limit to how far Gss can be increased. For typical sinc RF pulses of 4-8 ms duration and maximum Gss of 40 mT/m, the thinnest slices that can be achieved for EPI are about 1 mm on most scanners. (See Note 5.)

In order to move the slice along the Z direction we adjust the central frequency - the carrier frequency - of the sinc RF pulse. In the hand-drawn figure of the sinc-boxcar Fourier pairs above you'll notice the time domain sinc (bottom-left) is centered at zero time. In the rotating reference frame (for 123 MHz) this achieves slice selection at the magnet isocenter (i.e. exactly at 123 MHz, which is 0 Hz in the rotating frame), as drawn in the two cartoons of the cylinder, above. If the sinc's carrier frequency is increased, the resulting slice will slide towards the +Z direction, which is towards the top of the cylinder as shown. (It's also towards the subject's feet on my magnet. See Note 6 in Part Seven for the gradient directions.) Note that in moving the slice by changing its central frequency the slice thickness isn't altered.

Remember: gradients cause dephasing!

There's one more important issue to consider before we've achieved practical slice selection. The RF excitation pulse is being played out in the presence of Gss in order to spread frequencies along one dimension of the object. But as we've seen above and in Part Seven, gradients produce dephasing that can lead to signal attenuation, as well as their intended frequency encoding properties. To reverse the dephasing we now simply apply Gss as a gradient echo, akin to the frequency encoding echo in the previous section (except that we're not acquiring signals with this echo, just selecting magnetization):

I've shown a three-lobed sinc having an arbitrary flip angle, alpha. And it's concurrent with a slice select gradient, Gz. The inclusion of a reversed sign gradient (-Gz above) means that we will have achieved the desired slice selectivity during the RF pulse (and positive Gz lobe, above), then we negate the concomitant dephasing with a separate, reversed gradient episode after the RF pulse. In this way we get what we want (a slice) and eliminate what we don't want (signal attenuation).

You'll see this form of slice selection scheme in nearly all MRI pulse sequences, not just EPI. The area under the refocusing gradient (which is often called Gssr) needs to match the area under the Gss gradient from the mid-point of the RF pulse. In my figure I've drawn the Gssr episode with equal amplitude but opposite sign to the Gss episode, meaning that the duration of Gssr needs to be half that of Gss. Often, however, a little bit of efficiency can be achieved by making the amplitude of Gssr larger, then decreasing its duration in proportion to maintain its area. Very often the Gssr duration is matched to a gradient with another task, and the amplitude is adjusted accordingly. However it's done, the only rule is that the area under the refocusing gradient matches the gradient area from the mid-point of the RF pulse. (See Note 6.)

In the slice selection pulse sequence above I showed the RF pulse flip angle as alpha to reinforce the point that this gradient echo phase reversal scheme is necessary whether you are using a 30 degree flip angle or a 90. The only time the gradient echo isn't required is for RF pulses used for refocusing themselves, typically 180 degree RF pulses. But since these aren't commonly used for fMRI I won't go into more detail here. (See Note 7 if you're curious.)

Next post: two-dimensional imaging and k-space. No, it's not a cosmic phenomenon, it's a handy and intuitive way to visualize pulse sequences.



1.  I was wondering whether I should go through the spin echo as a precursor for the gradient echo, but decided against it on the basis that spin echoes aren't crucial for understanding what passes for standard fMRI experiments these days. I am also working from the assumption that most readers will have been exposed to an introductory course on NMR or MRI and so have a rudimentary understanding of - at least have seen at some point - spin echoes. Turns out I'm not the first to think about this quandary. ReviseMRI deals with the question of whether to teach gradient or spin echoes first, here. I concur with ReviseMRI: gradient echo first. Not only that, but when I redo my graduate lectures for later this year I'm going to relegate spin echoes into the 'bonus' material. With apologies to my Berkeley colleague Erwin Hahn, there are too many other concepts for fMRI that should be covered first, especially when lecture time is tight.

2.  For typical slice-select gradient strengths on a typical 3 T scanner, with RF pulses that are between about 4-8 ms duration, it's possible to achieve 2D slices as thin as 1 mm or so. A more usual slice thickness for fMRI is in the range 2.5-4 mm, and there are two main reasons for this. Firstly, the volume of tissue scales with the voxel dimensions, and making any voxel dimension (including the slice thickness) too small can render the overall signal-to-noise ratio (SNR) unacceptably low to detect functional signal changes. Secondly, in order to sample the hemodynamic response following an event, we need to sample the entire brain every 2-3 seconds. We cannot, therefore, spend arbitrarily long acquiring loads of very thin slices. Instead, we have to compromise and acquire fewer thicker slices.

3.  If you can't remember how an RF pulse "works," by causing additional precession about an effective magnetic field, then you might want to break off and re-read an introductory text. For an fMRI lab I'd recommend Rick Buxton's book, Introduction to Functional Magnetic Resonance Imaging (see pages 134-9 in the 2nd edition) and Functional Magnetic Resonance Imaging by Huettel, Song and McCarthy (see pages 106-9 in the 2nd edition). Both of these excellent books are eminently readable. Not quite beach reading, but as close as you're likely to come!

4.  In reality the sinc profile must be truncated, typically after just three, four or five side lobes on either side. This causes the slice profile to be very slightly trapezoidal rather than perfectly square. Furthermore, there are some small ripples outside of the trapezoid, on either side, arising from the truncation. (Recall that squares in the time domain cause sinc-shaped ripples in the frequency domain!) For this reason it is common to acquire interleaved slices (odds then evens, say) to allow half of TR relaxation between adjacent slice excitation. However, some labs prefer to acquire sequential slices because there is less effect of through-plane motion perturbing the T1 steady state. If you want more information on interleaved versus sequential slices, see the section "Should I use interleaved or sequential slices for fMRI?" in my user training/FAQ notes, available via this post. I may do a separate post here on RF excitation profiles at a much later date, but it's worth noting that imperfect RF profiles come a long way down list of concerns and artifacts that hamper EPI and fMRI.

5.  For EPI it's impractical to increase the sinc RF pulse much past 8 ms for a number of reasons, one of which is that it increases the minimum echo time (TE), thereby placing a constraint on the number of slices that can be acquired for a given TR. There may also be hardware limitations.

6.  There is a method, called z-shimming, which seeks to tweak the slice select refocusing gradient, and maybe some other gradients, in order to combat the dephasing effects of susceptibility gradients arising from the sample itself, not just the effects of Gss. There are, naturally, pros and cons to z-shimming. It's not a technique in widespread use but I'll find the time to cover it in a later post since I can't find a good review article on it, only technical primary references.

7.  Refocusing RF pulses that are used to produce spin echoes, and which are usually (but not always) 180 degree flips, do not require the reversed sign rephasing gradient episode that excitation RF pulses do. That's because the dephasing that happens during the first half of the 180 degree RF pulse is matched by the rephasing that happens during the second half; refocusing pulses are inherently balanced.

No comments:

Post a Comment