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!

Monday, July 11, 2011

Physics for understanding fMRI artifacts: Part Seven

Magnetic field gradients and one-dimensional MRI

Now that you have a basic understanding of the Fourier transform and some of the practical matters that arise from digital signals, it's time to look at a basic imaging pulse sequence and even make some simple images. We're going to use frequency encoding only for the time being, and for now we're going to make one-dimensional images (also called profiles) so that we can introduce an alternative form of timing diagram to represent a pulse sequence.


A magnetic field gradient alters the local resonance frequency

When a sample is placed into the magnet, all the protons (1-H nuclei) resonate at a near-identical frequency. At 3 T that resonance frequency is approximately 123 MHz, as given by the Larmor equation. If we then impose a magnetic field gradient across the sample - your subject's head, say - instead of having the same resonance frequency uniformly across the brain, there will now be a linear dependence in space (see Note 1):


In a real image we might consider 64 different positions along x. These would define the voxels in one (in-plane) dimension of the image. But for the time being we'll consider just three points in the x direction: the central point, and one point either side.

At the center of the magnet the gradient has no net effect, so the resonance frequency at that point is still 123 MHz. We call this point the null crossing, because all three linear gradients, X, Y and Z, are engineered to have no effect here. (See Note 2.) And to keep things symmetric, the gradient null crossing is placed in the geometric center of the magnet - the isocenter - because that's where the main magnetic field has been engineered to be most homogeneous, and we want to do all our imaging in that location to get the best scanner performance.

Saturday, July 2, 2011

MRI Claymation

It's a long weekend here in the US of A, it's hotter than Hades here in northern California (they said there would be a fog-cooled sea breeze! I want my money back!), and I am only halfway through the next post in the background physics series on account of having spent a very pleasant week in Quebec at the Human Brain Mapping conference. So, in lieu of anything more useful at short notice, I thought I'd share a truly awesome video I just found online, courtesy of Andre van der Kouwe and colleagues at MGH. The first two minutes demonstrate the method - surface renderings from MRIs of clay figures - and then it gets really fun: MRI making an image of itself.




427 views in two years simply doesn't do this work justice. Let's fix that!

Thursday, June 23, 2011

Physics for understanding fMRI artifacts: Part Six

Practical issues arising from the use of the Fourier transform in MRI

Here's the plan for this post. We will complete our look at functions undergoing Fourier transformation; there are some really useful relationships to see and to commit to memory (even when the figures are hand drawn for expediency!). Then we will look at the effects of the FT on real signals. We have two issues to consider: 1) a finite sampling window, and 2) digitization. Off we go!

Fourier pairs

We saw in the last post (Part Five) how a single frequency - a sinusoid - can be represented by a single line - a delta function - in a frequency domain plot. This is an example of a Fourier pair because the relationship holds both ways, i.e. if you take a delta function in the time domain and FT it you get a sinusoid in the frequency domain, and vice versa:


What about other useful Fourier pairs? Here's a useful relationship. An exponential decay Fourier transforms into what's known as a Lorentzian line:


Again, remember that the exponential can be in either the time domain or the frequency domain, although in MRI we generally deal with exponential decays (signals) in the time domain. It's also worth pointing out here that the faster the exponential decay, the broader the Lorentzian line in the other domain. This inverse relationship has a number of practical consequences for fMRI. I'll come back to this point below.

I found an interactive online tool on the National High Magnetic Field Lab's website that allows you to change the rate of decay as well as the frequency of an oscillation in the time domain, and see the resulting Lorentzian line in the frequency domain. Tinker with it here. (It's Java, it takes a couple of seconds to load.)

Next, let's look at what could be arguably the most useful Fourier pair for MRI. A boxcar (or top hat) function Fourier transforms into a sinc function, where sinc(x) = sin(x)/x:

Wednesday, June 15, 2011

Physics for understanding fMRI artifacts: Part Five

An introduction to the Fourier transform - what it does and how it works


Moving along from bathroom design and complex numbers, it's time to look at one of the most fundamental mathematical relationships underpinning all of modern MRI: the Fourier transform (FT). Accordingly, I would strongly suggest that you make sure you fully understand everything in this post before continuing into future posts.

You may not believe it by looking at us, but take it from me that MR physicists do "mental FTs" every day as we compare pulse sequences, try to understand artifacts and so on. Many of us (me) are not mathematically inclined, either. But being able to switch your mind between domains, as they are called, is a really useful skill if you want to be good at artifact recognition. An MR physicist will see something in one domain and will immediately try to imagine how it would appear in the alternate domain. Thus, if an image contains an artifact - an intense stripe, say - the MR physicist tries to imagine what signal-acquisition domain feature is implied by it, then tries to track it down. Alternatively, when comparing two different pulse sequences - GRAPPA on versus GRAPPA off, perhaps - the MR physicist will project the implications of each into the image domain in order to comprehend the likely practical consequences. You don't have to remember the equations or even understand the maths itself, but it is really useful to grasp the concepts!


Fourier analysis: the art of decomposition

As you have seen in your introductory texts and in previous video lectures, MRI signals are actually time-varying voltages that are induced in receiver coils as a result of magnetization oscillating (precessing) about the polarizing magnetic field. The detection of time-varying signals has several implications for obtaining MR images, the very first of which is choosing a representation for the information content in the signals.

Consider the two waveforms on the left-hand side of the figure below, which have the same amplitude but differ in their frequency:

Courtesy: Karla Miller, FMRIB, University of Oxford.

It is possible in principle - and in practice for simple examples such as these - to take a ruler and measure the amplitude and frequency and then draw a graph representing the time varying signals as a plot of amplitude (along y) against frequency (along x), as shown on the right-hand side of the above figure. Piece of cake, right?

Monday, June 13, 2011

Discriminate equally when recruiting subjects

Inclusion and exclusion criteria possibly don't get the scrutiny in fMRI studies that they should. After all, who reports the complete criteria in the methods sections of articles? At best we get headline exclusions. Without the full questionnaires we, as readers (and reviewers), must trust that no biases were introduced accidentally. Yet, like subtle parameter (mis)settings on the scanner, precisely how experimental and control groups are established is going to have profound effects on your results. They'd better!

A study included in Neuroskeptic's extremely useful weekly roundup of neuroscience makes the point of group bias quite clearly with a hypothetical example, and highlights the possibility that in selecting healthy controls we might accidentally set the bar higher than for the target group, introducing a potential confound to the experiment: Beware the "super well" - why the controls in psychology research are often too healthy.

Obvious? It should be, to a careful experimentalist. But there are insidious ways this selection bias can creep into your studies, making the point worth repeating ad nauseam in my opinion, especially to the waves of newcomers to our field. (Preach this lesson to all incoming students!) I'm going to make the unsubstantiated statement that subject selection (and its alliteration!) ranks above both acquisition and post-processing methods when it comes to biases and the ability to get an incorrect result with fMRI. It's critically important to balance physiological as well as psychological profiles as closely as possible between experimental and control groups.

The insidious biases? Whenever one or other group is difficult to recruit, for demographic reasons or whatever, there is a tendency to let certain things slide in order to net the requisite total. Don't cut this corner! Match as many factors as you possibly can, then note any factors that you can't match and include them in your experiment as covariates of no interest. In this way you might avoid the embarrassment of interpreting a neural difference for something that is better explained by physiology; hematocrit levels, say.

Remember, your fMRI experiment starts when you start recruiting subjects. And the less rigorously you do this fundamental, crucial step the more likely you are to get big error bars, or worse. Even I can't help your data at that point!

Friday, June 10, 2011

If Blogger designed bathrooms...

...you can bet they would insist on power outlets over the bathtub. And two in the shower. (You never know when your laptop might get low on battery.)

Until they move into the construction industry, however, we must content ourselves with their software design skills, such as this gem: 



The "Screw your career six ways from Sunday button," a.k.a. the Publish Post button, is carefully placed well away from any button that you might want to use on a repeated basis for other reasons entirely. This layout is cunningly designed for blogging highly contentious posts; the sort where in your draft you might write reminder notes to yourself. Like, say, "Make sure you reference Mike Dood's crappy article on neologisms. Utter bollox!" These notes are, like Tweets from a congressman to female college students, designed to be confidential. You don't want them accidentally distributed to three billion random strangers just because you pushed your finger on the click pad a little too far to the left after that second glass of red wine, for instance. (Yeah, picky I know.) And you'd rather Mike Dood - a colleague in your department - didn't know your true feelings on his work, either. *

Ah, Blogger. Bless. Did James Bond ever have to put up with this sort of crap from Q, I wonder? I don't recall the eject button ever appearing in between the seek button on the radio and the cigarette lighter. Not even on the Lotus Esprit. And I'm sure James would have pointed it out if it had. Not exactly the most robust design, to be honest. ("Ah! Country music! I can't handle that. Let's see what else we can get out here in...  Fuuuuuu...!")





* Recovering from accidental publication is as simple as rushing to the Edit Posts page and deleting the offending post, then starting again from scratch now that you have just trashed all your work, all the while praying that not too many people just got e-notified of your new post and managed to see it (and cache it!) before you were able to hit Delete.

Physics for understanding fMRI artifacts: Part F(f)our

(Wondering why the title has F(four) in it? It's so that Blogger can't trash this post for a third time! I'm giving it a new, unique name. Ha!)

It's finally time to get back to the series of posts on the essential physics concepts that will allow you to interpret and differentiate between acquisition artifacts. There are another five or six posts in this background series, so bear with me. After that we will shift gears and look at "good data," taking some time to assess the normal variations that you can expect to see in time series EPI, and then I promise we'll look at artifacts themselves.


When reality meets imagination

Before we go any further there are a few mathematical properties we need to review. These are actually quite simple relationships that, for the most part, can be explained via a handful of pictures. Like this one....

Maths dude, chillin'.

Complex numbers

The name notwithstanding, complex numbers are quite straightforward to understand from a physical perspective, with a tiny bit of explanation. By the time you've finished reading this post you should have a basic idea of what complex numbers mean and where they come from (they arise quite naturally, as it happens), but for now I am simply going to define some relationships. Hang in there.

We start by defining a so-called imaginary number as any number for which the square is negative. The squares of real numbers - the ones you're used to in everyday life, such as 2, 8.73, -7, pi, and so on - are always positive, whether the number being squared is positive or negative. Thus 2x2 = 4, 8.73x8.73 = 76.2129, -7x-7 = 49 and so on. Squaring a negative number results in a positive number. So how could we possibly get an answer of -4 or -25 out of any square?