Magnetoencephalography

# Overview
Magnetoencephalography (MEG) is an imaging technique used to measure the magnetic fields produced by electrical activity in the brain via extremely sensitive devices such as superconducting quantum interference devices (SQUIDs).  These measurements are commonly used in both research and clinical settings. There are many uses for the MEG, including assisting surgeons in localizing a pathology, assisting researchers in determining the function of various parts of the brain, neurofeedback, and others.

# History of the MEG
The MEG was first measured by David Cohen  in 1968, before the availability of the SQUID, using only a copper induction coil as the detector. To reduce the magnetic background noise, the measurements were made in a magnetically shielded room. However, the insensitivity of this detector resulted in poor, noisy MEG signals, which were difficult to use. Then, later at MIT, he built a better shielded room, and used one of the first SQUID detectors (just developed by Zimmerman) to again measure the MEG. This time the signals were almost as clear as the EEG, and stimulated the interest of physicists who had begun looking for uses of SQUIDs. Thus, the MEG began to be used, so that various types of spontaneous and evoked MEGs began to be measured.
At first only a single SQUID detector was used, to successively measure the magnetic field at a number of points around the subjects head. This was cumbersome, and in the 1980s,  MEG manufacurers began to increase the number of sensors in the dewar to cover a larger area of the head, using a correspondingly larger dewar.  Present-day MEG dewars are helmet-shaped and contain as many as 300 sensors, covering most of the head, as shown in the first figure.  In this way, MEGs of a subject or patient can now be accumulated rapidly and efficiently.

# The basis of the MEG signal
The MEG (and EEG) signals derive from the net effect of ionic currents flowing in the dendrites of neurons during synaptic transmission. In accordance with Maxwell's equations, any electrical current will produce an orthogonally oriented magnetic field. It is this field which is measured with MEG. The net currents can be thought of as current dipoles which are currents defined to have an associated position, orientation, and magnitude, but no spatial extent.  According to the right-hand rule, a current dipole gives rise to a magnetic field that flows around the axis of its vector component.
In order to generate a signal that is detectable, approximately 50,000 active neurons are needed. Since current dipoles must have similar orientations to generate magnetic fields that reinforce each other, it is often the layer of pyramidal cells in the cortex, which are generally perpendicular to its surface, that give rise to measurable magnetic fields.  Furthermore, it is often bundles of these neurons located in the sulci of the cortex with orientations parallel to the surface of the head that project measurable portions of their magnetic fields outside of the head. Researchers are experimenting with various signal processing methods to try to find methods that will allow deep brain (i.e., non-cortical) signal to be detected, but as of yet there is no clinically useful method available.
It is worth noting that action potentials do not usually produce an observable field, mainly because the currents associated with action potentials flow in opposite directions and the magnetic fields cancel out. However, action fields have been measured from peripheral nerves.

# Magnetic shielding
Because the magnetic signals emitted by the brain are on the order of a few femtoteslas (1 fT = 10^{-15} T), shielding from external magnetic signals, including the Earth's magnetic field, is necessary. An appropriate magnetically shielded room can be constructed of aluminum and mu-metal for reducing high-frequency and low-frequency noise, respectively. Moreover, noise cancellation algorithms can reduce both low-frequency and high-frequency noise. Modern systems have a noise floor of around 2 to 3 fT per Hz above 1 Hz.

# Source localization

## The inverse problem
Main article: Inverse problem
In order to determine the location of the activity within the brain, advanced signal processing techniques are used which use the magnetic fields measured outside the head to estimate the location of that activity's source. This is referred to as the inverse problem. (The forward problem is a situation where we know where the source(s) is (are) and we are estimating the field at a given distance from the source(s).) The primary technical difficulty is that the inverse problem does not have a unique solution (i.e., there are infinite possible "correct" answers), and the problem of finding the best solution is itself the subject of intensive research. Adequate solutions can be derived using models involving prior knowledge of brain activity.
The source models can be either overdetermined or underdetermined. An overdetermined model may consist of a few point-like sources, whose locations are then estimated from the data. The underdetermined models may be used in cases where many different distributed areas are activated; there are several possible current distributions explaining the measurement results, but the most likely is selected. It is believed by some researchers in the field that more complex source models increase the quality of a solution.  However this may decrease the robustness of the estimation and increasing the effects of forward model errors.  Many experiments use simple models, reducing possible sources of error and decreasing the computation time to find a solution.  Localization algorithms make use of the given source and head models to find a likely location for an underlying focal field generator.  An alternative methodology involves performing independent component analysis first in order to segregate sources without using a forward model, and then localizing the separated sources individually.  This method has been shown to improve the signal-to-noise ratio of the data by correctly separating non-neuronal noise sources from neuronal sources, and has shown promise in segregating focal neuronal sources.
Localization algorithms using overdetermined models operate by successive refinement.  The system is initialized with a first guess.  Then a loop is entered, in which a forward model is used to generate the magnetic field that would result from the current guess, and the guess then adjusted to reduce the difference between this estimated field and the measured field.  This process is iterated until convergence.
Another approach is to ignore the ill-posed inverse problem and estimate the current at a fixed location.  One such approach is the second-order technique known as Synthetic Aperture Magnetometry (SAM), which uses a linear weighting of the sensor channels to focus the array on a given target location.

## Magnetic source imaging
The estimated source locations can be combined with magnetic resonance imaging (MRI) images to create magnetic source images (MSI).  The two sets of data are combined by measuring the location of a common set of fiducial points marked during MRI with lipid markers and marked during MEG with electrified coils of wire that give off magnetic fields.  The locations of the fiducial points in each data set are then used to define a common coordinate system so that superimposing ("coregistering")  the functional MEG data onto the structural MRI data is possible.
A criticism of the use of this technique in clinical practice is that it produces colored areas with definite boundaries superimposed upon an MRI scan: the untrained viewer may not realize that the colors do not represent a physiological certainty, because of the relatively low spatial resolution of MEG, but rather a probability cloud derived from statistical processes.  However, when the magnetic source image corroborates other data, it can be of clinical utility.

# MEG Use in the Field
The clinical uses of MEG are in detecting and localizing epileptiform spiking activity in patients with epilepsy, and in localizing eloquent cortex for surgical planning in patients with brain tumors or intractable epilepsy.
In research, MEG's primary use is the measurement of time courses of activity, as such time courses cannot be measured using functional magnetic resonance imaging (fMRI).  MEG also accurately pinpoints sources in primary auditory, somatosensory and motor areas, whereas its use in creating functional maps of human cortex during more complex cognitive tasks is more limited; in those cases MEG should preferably be used in combination with e.g. fMRI. It should be noted, however, that neuronal (MEG) and hemodynamic (fMRI) data do not necessarily agree and the methods complement each other. However, the two signals may have a common source: it is known that there is a tight relationship between LFP (local field potentials) and BOLD (blood oxgenation level dependent) signals.  Since the LFP is the source signal of MEG/EEG, MEG and BOLD signals may derive from the same source (though the BOLD signals are filtered through the hemodynamic response).
MEG has also recently been used somewhat more controversially to study more sophisticated cognitive processes such as audition and language processing.

# Comparison with Other Imaging Techniques
MEG has been in development since the 1960s but has been greatly aided by recent advances in computing algorithms and hardware, and promises good spatial resolution and extremely high temporal resolution (better than 1 ms); since MEG takes its measurements directly from the activity of the neurons themselves its temporal resolution is comparable with that of intracranial electrodes.  MEG's strengths complement those of other brain activity measurement techniques such as electroencephalography (EEG), positron emission tomography (PET), and fMRI whose strengths, in turn, complement MEG.  Other important strengths to note about MEG are that the biosignals it measures do not depend on head geometry as much as EEG does (unless ferromagnetic implants are present) and that it is completely non-invasive, as opposed to PET and possibly MRI/fMRI.

# Notes
-  Cohen D.  Magnetoencephalography: evidence of magnetic fields produced by alpha rhythm currents.  Science 1968;161:784-6.
-  Zimmerman, J.E., Theine, P., and Harding, J.T.  Design and operation of stable rf-biased superconducting point-contact quantum devices, etc.  Journal of Applied Physics 1970; 41:1572-1580.
-  Cohen D.  Magnetoencephalography:  detection of the brain's electrical activity with a superconducting magnetometer.  Science 1972;175:664-66
-  Okada Y (1983): Neurogenesis of evoked magnetic fields. In: Williamson SH, Romani GL, Kaufman L, Modena I, editors. Biomagnetism: an Interdisciplinary Approach. New York: Plenum Press, pp 399-408
-  The Forward model - the imaging process by Bjorn Gustavsson (2000)

# Further reading
- Hamalainen, M., Hari, R., Ilmoniemi, R., Knuutila, J. and Lounasmaa, O. V. (1993) "Magnetoencephalography  theory, instrumentation, and applications to noninvasive studies of signal processing in the human brain" in Reviews of Modern Physics 1993, 65: pp. 413497
- Tanzer I.O., (2006) Numerical Modeling in Electro- and Magnetoencephalography, Ph.D. Thesis, Helsinki University of Technology,
(Available online: /)
- Baillet S., Mosher J. C., Leahy R. M.(2001) "Electromagnetic Brain Mapping" in IEEE Signal Processing Magazine, November 2001, 14-30.
- Cohen, D. "Boston and the history of biomagnetism". Neurology and Clinical Neurophysiology 2004; 30: 1.
- Cohen, D., Halgren, E. (2004). "Magnetoencephalography".  In: Encyclopedia of Neuroscience, Adelman G., Smith B., editors  Elsevier, 1st, 2nd and 3rd  (2004) editions.
-  for very basic though clear information about MEG