impact of different registration methods on meg source -...

76
FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN ABTEILUNG MOLEKULARE BIOLOGIE Impact of Different Registration Methods on MEG Source - Analysis Einfluss unterschiedlicher Registrierungsmethoden auf die Quellanalyse von MEG Daten Master Thesis zur Erlangung des akademischen Grades Master of Sciences (M.Sc.) im Studiengang Molekulare Biologie im Schwerpunkt Bioinformatik vorgelegt von Marie Theiß aus Krefeld Recklinghausen, 18. Juli 2016

Upload: others

Post on 19-Jan-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

ABTEILUNG MOLEKULARE BIOLOGIE

Impact of Different Registration Methods on MEG Source - Analysis

Einfluss unterschiedlicher Registrierungsmethoden auf die Quellanalyse von MEG Daten

Master Thesis

zur Erlangung des akademischen Grades

Master of Sciences (M.Sc.)

im Studiengang Molekulare Biologie

im Schwerpunkt Bioinformatik

vorgelegt von

Marie Theiß

aus Krefeld

Recklinghausen, 18. Juli 2016

Page 2: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

1

Erklärung

Hiermit erkläre ich, dass die vorliegende Arbeit von mir selbst und nur unter Ver-

wendung der angegebenen Hilfsmittel angefertigt wurde. Eingereicht wird die

Masterthesis in dreifacher Ausführung.

Alle Abbildungen wurden selbst erstellt, und es wurde keine inhaltsverändernde

Bildbearbeitung vorgenommen.

Der erste Teil dieser Arbeit wurde an der westfälischen Wilhelms-Universität im Institut

für Biomagnetismus und Biosignalanalyse unter der Anleitung von Priv.-Doz. Dr.

Carsten Wolters durchgeführt. Betreut durch Christophe Grova wurde der zweite Teil

dieser Thesis im Institut für Physik an der Concordia Universität in Montreal, Kanada

erarbeitet.

Recklinghausen, 18. Juli 2016

Marie Theiß

Page 3: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

2

Betreuer:

1. Gutachter: Prof. Dr. Heinrich Brinck

Westphalian University of Applied Sciences

Institute for Bioinformatics and Chemoinformatics

August-Schmidt-Ring 10

45665 Recklinghausen

2. Gutachter: PD Dr. Carsten Wolters

University of Münster

Institute for Biomagnetism and Biosignalanalysis (IBB)

Malmedyweg 15

48149 Münster

Page 4: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

3

Acknowledgements

Für die Betreuung und Begutachtung dieser Masterarbeit möchte ich mich bei Heinrich Brinck

und Carsten Wolters bedanken. Christophe Grova und Andreas Wollbrink haben zudem durch

ihre hilfreichen Anregungen und die konstruktive Kritik maßgeblich dazu beigetragen haben,

dass diese Masterarbeit in dieser Form vorliegt.

Es ist nicht möglich, alle Menschen namentlich zu erwähnen, die mich in den letzten Jahren

unterstützt und während meines Studiums begleitet haben. Trotzdem gilt diesen Personen

mein Dank, weil sie alle meine Launen ertragen haben, ohne dabei die Geduld zu verlieren.

Besonders hervorheben möchte Sabine Nixon, wie bereits bei meiner Bachelorarbeit, hat sie

die undankbare Aufgabe des Korrekturlesens übernommen und mir damit sehr geholfen.

Meinen Professoren danke ich zunächst für eine sehr gute fachliche Ausbildung. Insbesondere

aber auch für die aufmunternden Worte, ohne die ich nicht den Mut gehabt hätte für einige

Monate ins Ausland zu gehen.

Zuletzt seien noch diejenigen Personen erwähnt, ohne die es nicht möglich gewesen wäre,

diese Arbeit zu schreiben. Mein herzlicher Dank gebührt all denjenigen, die ihre Daten für diese

Arbeit zur Verfügung gestellt haben, den Mitarbeitern des Instituts für Biomagnetismus in

Münster und ganz besonders all den Mitarbeitern im Labor von Christophe Grova.

Page 5: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

4

List of abbreviations

[EEG] Electroencephalography

[ERF] Event-Related Fields

[FBM] Fiducial Based Matching

[GOF] Goodness of Fit

[ICP] Iterative Closest Point

[LPA] Left Pre-Auricular Point

[MEG] Magnetoencephalography

[MR] Magnetic Resonance

[MRI] Magnetic Resonance Imaging

[MRT] Magnetic Resonance Tomography

[MZ] Longitudinal Magnetization

[MXY] Transverse Magnetization

[NAS] Nasion

[PSP] Postsynaptic Potential

[RPA] Right Pre-Auricular Point

[RV] Residual Variance

[SBM] Surface Based Matching

[SinSh] Single Shell

[SinSp] Single Sphere

[SQUID] Superconducting Quantum Interference Device

Page 6: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

5

Table of contents Part I: Impact of Different Registration Methods on MEG Source Analysis ............................... 7

I. Summary .............................................................................................................................. 7

II. Introduction ......................................................................................................................... 9

Somatosensory Evoked Responses ................................................................................... 11

Maxwell’s equations .......................................................................................................... 14

III. Material and Methods ....................................................................................................... 18

Magnetoencephalography Data ........................................................................................ 18

Magnetic Resonance Imaging Data ................................................................................... 21

IV. Results................................................................................................................................ 26

Head Model ....................................................................................................................... 27

Registration Method .......................................................................................................... 28

Differences Caused by Head Model .................................................................................. 31

Differences Caused by Co-Registration Method ............................................................... 33

V. Discussion .......................................................................................................................... 39

VI. Conclusion and Outlook .................................................................................................... 44

VII. Appendix I ....................................................................................................................... 45

Page 7: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

6

Part II: Implementation of a Brainstorm Process for Chamfer Distance based MEG - MRI Co-Registration................................................................................................................................ 49

VIII. Summary ......................................................................................................................... 49

IX. Introduction ....................................................................................................................... 50

X. Material and Methods ....................................................................................................... 55

Brainstorm Process Functions ........................................................................................... 55

Sub-Functions .................................................................................................................... 58

XI. Results................................................................................................................................ 61

XII. Discussion ....................................................................................................................... 66

XIII. Conclusion and Outlook ................................................................................................. 67

XIV. Appendix II ...................................................................................................................... 68

Page 8: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

7

Part I: Impact of Different Registration Methods on MEG Source Analysis

I. Summary For this thesis the impact of different forward model errors on MEG source localization was

evaluated. For this purpose, source localization of somatosensory evoked potentials was

performed. Two different head models were used for forward modelling. Moreover, two

different approaches to aligning the MRI data to the MEG head coordinate system were used.

Since the permeability profile for MEG is almost uniform within the whole head, a basic single

sphere head model was used. The second one was a single shell volume conduction model,

which submits a simple and fast MEG forward computation for a realistically shaped surface

of the brain. This head model should supply more accurate results than the single sphere

model. Although the single sphere head model does not fit the brain surface perfectly, the

Euclidian distances between the dipole localizations obtained with the different head models

were very slight. In most cases they shifted less than 5 mm. Considering this, the single sphere

model seems to produce acceptable results for somatosensory evoked potentials. This

statement applies independently of the used co-registration method.

Two different co-registration procedures were used to calculate the transformation matrix

which specifies how to align the MRI data to the MEG head coordinate system: on the one

hand, a frequently used approach which relies on three anatomical markers, and on the other

hand, a more advanced procedure which uses the iterative closest point algorithm. In order

to depict the differences caused by the method, the Euclidian distance between the localized

sources and the shift along the three space dimensions were noted. The Euclidian distance

between the reconstructed sources ranged from 4.01 to 16.76 mm. This means that erroneous

MRI and MEG data co-registration causes MEG gradiometer sensor positions displacement and

therefore affects source localization results. In conclusion, the results show that an accurate

knowledge of the MEG gradiometer sensor position relative to the head is necessary to

reconstruct neuronal activity for MEG measurements.

Page 9: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

8

Zusammenfassung

Diese Thesis untersucht die Auswirkungen verschiedener Fehler im Forward Model auf die

Quellenrekonstruktion von MEG Daten. Zu diesem Zweck wurden die somatosensorischen

Potentiale verschiedener Probanden ausgewertet. Das Forward Model wurde für zwei

verschiedene Kopfmodelle und mit Hilfe unterschiedlicher Registrierungsmethoden für die

MEG und MRI Daten erstellt. Aufgrund der Tatsache, dass die Ausbreitung der magnetischen

Felder im Kopf nahezu uniform ist, wurde einerseits ein single sphere Kopfmodell verwendet.

Das zweite Kopfmodell war ein realistisch geformter Volumenleiter, welcher die Oberfläche

des Gehirns repräsentierte. Das single sphere Kopfmodell stellt die Geometrie des Gehirns

nicht optimal dar. Trotzdem sind die Distanzen zwischen den mittels der unterschiedlichen

Kopfmodelle ermittelten Dipolpositionen nur sehr gering. In den meisten Fällen sind die

Quellen weniger als 5 mm voneinander entfernt. Diese Ergebnisse lassen darauf schließen,

dass das single sphere Modell für somatosensorische evozierte Potentiale akzeptable Resultate

erzeugt. In diesem Kontext ist nicht entscheidend, welche Registrierungsmethode angewendet

wird.

Zur Berechnung der Transformationsmatrix, welche die MRI Daten mit dem MEG Kopf-

Koordinatensystem aligniert, wurden zwei verschiedene Registrierungsverfahren genutzt.

Einerseits ein häufig verwendeter Ansatz, der über die Identifizierung dreier anatomischer

Marker funktioniert und andererseits ein genaueres Verfahren, bei dem der iterative closest

point algorithm für die Co-Registrierung genutzt wird. Zur Quantifizierung der durch die

Registrierungsmethode verursachten Effekte diente die euklidische Distanz zwischen den

rekonstruierten Dipolen. Zusätzlich wurde die Verschiebung der Dipole entlang der einzelnen

Raumkoordinaten betrachtet. Der Abstand zwischen den rekonstruierten Quellen variierte

zwischen 4.01 und 16.76 mm. Diese Ergebnisse zeigen, dass eine ungenaue Co-Registrierung

der MRI und MEG Daten eine fehlerhafte Lokalisierung der MEG Gradiometer Sensoren

verursacht. Infolgedessen werden auch die Positionen der rekonstruierten Dipole beeinflusst.

Zusammenfassend konnte gezeigt werden, dass es notwendig ist, die Position der MEG

Gradiometer Sensoren relative zum Kopf des Probanden genau zu bestimmen, um neuronale

Aktivitäten zu lokalisieren.

Page 10: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

9

II. Introduction This chapter presents a general overview of biological, biophysical and mathematical basics

applied in the research. Initially, it gives a brief introduction to the anatomical and biological

background of functional brain research. Afterwards different types of neurophysiological data

will be introduced. The focus will be upon magnetic resonance imaging (MRI) and

magnetoencephalography (MEG). At the end, this chapter gives a brief overview of

mathematical methods which are necessary to reconstruct the biological signal from

neurophysiological measurements.

General Organization of the Cerebral Cortex

The cerebral cortex, also referred to as gray matter, is the outer layer of the brain. It is about

2-3 mm thick and deeply wrinkled, so it contains sulci (depression or fissure in the brain

surface) and gyri (ridge on the cerebral cortex). The gray matter is built up of six layers of nerve

cells. In general, the cerebral cortex is divided into the left and right hemisphere which are

connected by the corpus callosum, a band of nerve fibres. Furthermore, it is possible to define

various regions of the cerebral cortex with regard to anatomical localization, function, or

cytoarchitectonic criteria.

Four anatomical regions are distinguished, the four lobes:

Table 1| Term, location and function of the anatomical regions of the cerebral cortex.

Lobe Location Function

Frontal At the front of each hemisphere,

behind the eyes

Decision making, planning,

problem solving

Parietal Behind the frontal lobe,

at the top of the brain

Reception and processing of

sensory information

Temporal Behind the frontal lobe and below the parietal

lobe, on both sides of the brain

Memory, emotion, hearing,

language

Occipital At the back of the brain Vision

Moreover, the cortex can be divided into functional regions, called cortical regions. The

association cortices (prefrontal cortex, inferior-temporal cortex and parietal-temporal-

Page 11: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

10

occipital cortex) are not related to motoric or sensory functions. These regions receive signals

from different cortical and subcortical areas. Secondly, there are primary and secondary

regions related to sensory input (vision, hearing and somatic sensation).

Lastly, the gray matter is parted into the neocortex and the allocortex, with regard to

cytoarchitectonic criteria. While the allocortex is built up of three to four layers, the neocortex

contains six layers, each with typical cells and fibres [Schmidt1990].

Table 2|Layers of the neocortex and typical cells.

I Molecular layer Contains very few neurons

II External granular layer Tightly packed small neurons and pyramidal cells

III External pyramidal layer Pyramidal cells

IV Internal granular layer Stellate cells

V Internal pyramidal layer Large pyramidal cells

VI Fusiform layer Fusiform cells

Brain Signal Transduction

Signal transduction between neurons occurs in terms of electrical transmission. A polarity

change across the cell membrane results from an action potential at the axon hillock. The

action potential expands along the axon up to the synapse. These action potentials are very

weak and exhibit hardly any temporal summation. Afterwards the impulse is transmitted from

the presynaptic to the postsynaptic neuron by neurotransmitters. The transmitters generate a

potential change at a postsynaptic receptor which is called postsynaptic potential (PSP). This

electrical current may flow from the postsynaptic cell to the environment or reverse,

depending on excitatory or inhibitory properties of the neurotransmitter. The postsynaptic

neuron can be irritated by different neurons at the same time. This means, the slow

postsynaptic currents afford a temporal summation. Provided that a certain threshold value is

exceeded by all incoming signals, the postsynaptic cell becomes depolarized (exhibiting) or

hyperpolarized (inhibiting). The cortex contains pyramidal cells which have parallel orientation

perpendicular to the cortical surface. With regard to this fact, electrical transmission of

Page 12: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

11

impulses can be used to determine the neuronal activity, since the spatial and temporal

alignment of PSPs creates measurable dipoles [Martin1991].

Somatosensory Evoked Responses

Almost any peripheral nerve can be stimulated by an electrical impulse which is applied on the

skin. If the nerve contains motor fibres, the innervated muscle twitches in response to the

stimulus. This means, the external stimulus generates a somatosensory evoked response. In

clinical practice the median and posterior tibial nerves are used most frequently. In order to

stimulate the median nerve, electrodes are placed at the subject’s wrist. The stimulus intensity

should have a controlled strength to see a clear thumb movement. Since muscle afferents are

activated due to the stimulus, a cortical somatosensory response can be observed in reaction.

The potentials are generated from the primary somatosensory cortex, thus localized to the

parietal scalp region [Nuwer1998].

Magnetic Resonance Imaging (MRI)

There are different high resolution imaging methods available for medical diagnostics and

research. Computed tomography and radiography are techniques which use x-rays to generate

images of internal structures of the body. While radiography creates a single image, the

computed tomography generates 3D representations from cross-sectional images of the body.

These imaging methods are used for dental examination, mammography or orthopedic and

chiropractic examinations.

In contrast, soft body parts like brain, viscera and tumors are visualized by use of magnetic

resonance (MR) imaging (nuclear magnetic resonance imaging). Normally, the magnetic

moments of the hydrogen protons are rotated in different directions. The magnetic resonance

imaging system creates a magnetic field which temporarily aligns the magnetic moments of

the hydrogen protons in the same direction (longitudinal magnetization MZ) and the same

phase. Afterwards a high frequency pulse changes the MZ orientation by about 90 degrees

whereby transverse magnetic field components occur. This transverse magnetization (MXY) can

be measured as the MR signal. The density of protons in a volume unit defines the maximum

Page 13: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

12

measurable signal. Depending on the hydrogen content tissues appear bright/white (high

hydrogen content) or black (low hydrogen content).

Moreover, the contrast in MRI scans depends on different relaxation times. The MXY abates

through longitudinal or transversal relaxation. The time required until the spin reverts to MZ

(longitudinal relaxation) is referred to as T1 time. How fast this process occurs depends on the

strength of the external magnetic field and the movement of molecules within the tissue.

Following it, the spins are irritable again.

If the activated spins do not evolve their energy to the environment, but exchange their

energy, the process is called transverse relaxation. After this decay of the MXY, the spins are

not in the same phase anymore. The time which is required for transversal relaxation is called

T2 and determines how fast the MR signal decays after excitation. It depends on the tissue; it

is not determined by the external magnetic field. The transverse and longitudinal relaxations

are not influenced by each other.

Similarly to computed tomography, MRI generates 3D representations from cross-sectional

images (tomographic images) of the body. The provided image is built up of units called voxels,

a 3D image building block. These cubes do not specify the physical dimensions. For that reason,

it is necessary to define a head coordinate system. This specifies the relation between voxel

indices and physical dimensions [Weishaupt2006].

Magnetoencephalography (MEG)

Electroencephalography (EEG) and magnetoencephalography (MEG) are non-invasive

methods of recording neural activity of the brain. The PSPs of pyramidal neurons, which are

located in different cortical layers, cause potential differences on the scalp. EEG reflects

summed up PSP of a large number of similarly oriented cortical neurons (pyramidal cells in the

neocortex) close to the recording electrode. Volume conduction describes the fact that the

EEG signal is distorted and blurred by the different conductive properties of the tissues

between the recording electrode and the source of the PSP. The EEG signal does not leave the

head, therefore the potential is measured on the scalp surface. The MEG is a second

electrophysiological technique which records the magnetic field outside the head using an

array of superconducting sensors (SQUID, superconducting quantum interference device).

Page 14: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

13

Since the direction of the magnetic field is perpendicular to the velocity of the charge, MEG

contains complementary information to EEG. For that reason, MEG is less sensitive to sources

generated in gyri (radial sources), as they do not produce a measurable magnetic field outside

of the head. In contrast to the electrical current, the magnetic field generated by the electrical

current is not influenced by tissue conductivity.

During MEG recordings, the location of the patient’s head inside the scanner is determined

relative to the MEG sensors. Therefore, three localization coils are fixed to the subject’s head

(nasion, right and left pre-auricular). The MEG scanner measures the coils and localizes them,

in relation to the SQUID positions. The three localization coils are used to define an MEG head

coordinate system. It contains the sensor positions, determined with regard to the subject’s

head [Kringelbach2010].

Forward Problem

Reconstruction of neural signals from MEG measurements requires different steps. The

forward problem describes how to predict an observation from a theoretical model, if a set of

parameters is given. In MEG source analysis this means forecasting the magnetic fields at the

sensor level generated by a particular primary source (forward modelling). This problem has a

unique solution, since well-defined values of parameters (e.g. geometry of the head,

conductivity of tissues, sensor locations) are used. Nevertheless, different forward models

produce different solutions. In order to determine the output for a putative source, an

individual model of the subject’s head is needed. The model contains the geometry as well as

the electrical properties of tissues (head modelling). To achieve an accurate forward model, it

makes sense to combine highly detailed anatomical information and MEG measurements. For

this purpose, a transformation matrix for the co-registration of the MRI voxel to the MEG head

coordinates system can be calculated. That way, both data sets are represented within the

same coordinate system. Thus, the MEG gradiometer sensor positions are known relative to

the subject’s head/head model. This is necessary in order to perform a precise forward

modelling [Kringelbach2010].

Page 15: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

14

Various types of head models are available. The simplest head model is spherical and does not

represent the actual geometry of the head. However, since a single sphere is used to

approximate the head shape and a homogeneous conductivity is assumed, an analytic solution

is available: the analytical solution of the quasi-static approximation of Maxwell’s equations

which can be computed to describe the potential on the surface.

A more advanced model is the realistic single-shell volume conduction model. In this case the

head is not described as a homogeneous sphere, but as a shell of individual (here the individual

brain) shape. This model may produce more accurate results in source reconstruction

[Nolte2003].

Maxwell’s equations

Maxwell’s equations are a set of partial differential equations, which describe the generation

of electric and magnetic fields. Moreover, they determine how the fields are altered by

charges, currents and each other. In forward computation the equations are used to define

the induced electromagnetic fields with regard to the head’s tissue and the neural currents.

∇ ∙ 𝐷 = 𝜌

∇ ∙ 𝐵 = 0

∇ × 𝐸 = −𝜕𝐵

𝜕𝑡

∇ × 𝐻 −𝜕𝐷

𝜕𝑡= 𝑗

The equation introduces several important variables: electric field 𝐸, magnetic field 𝐵, charge

density 𝜌, current density 𝐽, electric displacement field 𝐷, magnetic field strength 𝐻. Different

simplifications and mathematical transformations lead to the following equation for the

magnetic flux. It is applicable to each volume conductor model [Nolting2011].

𝐵(𝑟) = 𝐵𝑃(𝑟) −𝜇04𝜋∫ 𝜎(𝑟′)∇′𝜙(𝑟′) × ∇′

1

𝑅𝑑𝜐′

𝑉

Note that a detailed introduction to Maxwell’s equation is beyond the scope of this thesis. For

further information see [Plonsey1967].

Page 16: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

15

Inverse Problem

The forward problem has a unique solution, while the inverse problem might accept different

solutions, depending on the motivation of the experiment. Inverse modelling means to

estimate the values of the parameters of the system by the observations made during the

experiment. Thereby different objectives or theoretical models might lead to multiple

solutions to the same inverse problem. In source reconstruction the PSPs are approximated as

single or multiple dipoles. For each dipole 6 parameters (x, y, z location; 2 direction/orientation

and strength) are estimated. To perform inverse modelling, it is necessary to solve the forward

problem first. Afterwards, a dipole fit can be performed to solve the inverse problem. The

method minimizes the error between the forward model solution and the measured magnetic

field. For that purpose, the source parameters (location, orientation and strength) of a dipole

in the forward model are manipulated until it fits the measured potential or field. At this point

it is important to know that in contrast to the orientation and the strength of the dipole, the

position is estimated non-linearly [Kringelbach2010].

The sum of squares error is used to calculate the error between the forward model solution

and the MEG measurements.

Model for the data:

𝑌𝑚𝑜𝑑𝑒𝑙 = 𝑓(𝑥, 𝑎, 𝑏, 𝑐)

Measured potential at each electrode:

𝑌𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑑 = 𝑓(𝑥)

The equation contains the following variables:

EEG electrode positions: 𝑥

Dipole parameters (location, orientation, strength): 𝑎, 𝑏, 𝑐

An optimal dipole is selected by minimizing the sum of squares between the model and the

measured potential at each electrode:

min𝑎,𝑏,𝑐

{ ∑ [𝑌𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑑,𝑖 − 𝑌𝑚𝑜𝑑𝑒𝑙,𝑖(𝑎, 𝑏, 𝑐)]2

𝑁

𝑖=1

}

Page 17: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

16

The squared deviation is needed to determine the residual variance (RV) and maximal

goodness of fit (GOF) value for the calculated dipole. These parameters indicate how well the

computed dipole describes the measured data.

𝐺𝑂𝐹 = 1 − 𝑅𝑉

Task

The MR Tomography (MRT) provides an image of the subject’s head with a high spatial

resolution. These pictures are useful to determine a dipole position within the subject’s brain.

They can also be used to construct an individual head model, which provides the tissue

geometries and conductivities for source analyses (head modelling). For this purpose, the

images need to be pre-processed in mainly two steps. First of all, it is necessary to align the

MRI to the MEG head coordinate system (co-registration).

The MR images are usually represented in a ‘voxel’ coordinate system (voxel space) without

physical dimensions. In order to get physical coordinates (coordinates within the source space)

for each voxel, a homogenous transformation matrix is needed. This matrix determines the

voxel’s position within the MEG head coordinate system.

The MEG head coordinate system is based on three anatomical markers. One marker is located

at the nasion (NAS) and two at the right and left pre-auricular points (RPA, LPA). The axes are

defined in the following way:

Table 3| Axes definition for the MEG head coordinate system.

origin exactly between LPA and RPA

X-axis goes towards NAS

Y-axis goes approximately towards LPA

orthogonal to X and in the plane spanned by the fiducials

Z-axis goes approximately towards the vertex, orthogonal to X and Y

Two different approaches were used to calculate the transformation matrix which specifies

how to go from voxel space to the source space. The registration procedures could generate

slightly different transformation matrices although both of them should describe the voxel

position in the MEG head coordinate system.

Page 18: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

17

A frequently used approach to achieving an accurate co-registration of the MRI to the head

coordinate system relies on the three anatomical markers. To determine their positions during

the MR recordings, Fiducials (Gadolinium markers) which generate bright spots in the slices

are fixed on the subject’s head. The markers can be identified manually in the MR images, and

the transformation matrix is calculated based on their positions.

In this particular case, an accurate co-registration depends on precise determination of the

anatomical markers in both data sets. But this registration procedure contains several possible

sources of error, since the landmark digitization has an offset of several millimeters

[Singh1997]. Moreover, the Gadolinium markers can slip out of place during recordings. Thus

their position cannot be accurately defined within the MRI. Moreover, the MEG scanner does

not measure the three localization coils continuously. This means that not every movement of

the patient’s head is detected. As a consequence, the source space coordinates might differ

slightly between MEG and MRI data. Altogether, the small number of landmarks, as well as the

sources of error during localization, might lead to an imprecise co-registration of the different

data sets.

A second approach uses the iterative closest point (ICP) algorithm to minimize the distance for

each point of a point cloud to its nearest neighbor on a surface. A representation of the head

surface can be generated by segmenting the MRI into the different tissue types and afterwards

creating a triangulated mesh for the scalp. In addition, a point cloud is needed, representing

the head surface. It should contain the three anatomical markers, since they are necessary to

define the MEG head coordinate system. For this purpose, the ICP algorithm minimizes the

distance between the digitized point cloud and the MRI segmented head surface iteratively. A

precise determination of the anatomical markers becomes obsolete if the points that

represent the surface are used for co-registration. This study determines the sensitivity of MEG

source reconstruction for somatosensory evoked fields to the co-registration method with

respect to source localization. Considering that, somatosensory evoked responses of 7 healthy

subjects were analyzed using a single sphere as well as a single shell head model.

Page 19: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

18

III. Material and Methods The following section presents an overview of material and data acquisition as well as the

methods used for data pre-processing. Data acquisition took place at the Institute for

Biomagnetism and Biosignalanalysis of the University of Münster. All processing steps were

performed with the Matlab software Toolbox FieldTrip [Oostenveld2011]. The Toolbox offers

different algorithms for MEG/EEG and MRI data analysis.

Data Pre-Processing

Before source analysis is possible, the different data sets need to be pre-processed. Filtering,

cutting the data into interesting segments, and artifact rejection are main steps in MEG data

pre-processing. Afterwards the data can be analyzed by averaging. A segmentation step is

necessary to extract the outer brain surface from the anatomical MRI scans. This step takes

place after MRI – MEG co-registration. Later on, the segmented MRI data are needed to

construct an individual head model for forward modelling.

Magnetoencephalography Data

The MEG measurements were made in a magnetically shielded room in supine position. A 275

channel whole head MEG with 29 reference channels (to calculate synthetic gradiometers)

(CTF, VSM, MedTech Ltd.) was used to acquire the functional data. Head movements were

recorded during the measurements with three head localization coils and the data were

discarded if the head movements were greater than 8 mm.

During the recordings a square electrical pulse with 0.5 ms duration was used to stimulate the

median nerve of the patient’s wrist. In this manner somatosensory evoked potentials were

produced. Each run took 7 minutes and included about 950 stimuli with an inter-stimulus

interval of 350 to 450 ms. The sampling rate was 1200 Hz. The stimulus took place randomly

at the left or right median nerve and its strength was controlled to see a clear thumb

movement. The polarity was reversed during the second half of the measurement in order to

reduce stimulus artifacts and prevent familiarization.

The raw data from the MEG measurements have to be pre-processed by filtering, re-

referencing, baseline correction and identifying artifacts. Moreover, for event-related

potential analysis, it makes sense to define data segments of interest and average across trials.

Page 20: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

19

In this manner, the event-related fields (ERF) are obtained and a source reconstruction could

be done.

For noise elimination one of the most successful synthetic methods is available: synthetic

higher-order gradiometers are computed for cancelling the noise without reducing the signal.

Using this noise elimination method, the MEG gradiometers are much more sensitive to the

weak brain signals than to sources from the environment.

% Synthetic Denoise

cfg.channel = {'MEG' 'MEGREF'};

cfg.gradient = 'G3BR';

rawData = ft_denoise_synthetic(cfg, rawData);

Since the data should be analyzed with a view to event-related potentials and fields, it is useful

to define the data segments of interest. After the boundaries of those segments have been

defined it is possible to represent them as trials. These trials are averaged later to obtain clear

signals. Depending on the experiment it is crucial to provide a function which decodes the

trigger sequence.

% Define Segments of Interest

cfg.trialdef.prestim = 0.1;

cfg.trialdef.poststim = 0.1;

cfg.trialfun = 'trialfunction;

cfg = ft_definetrial(cfg);

trialData = ft_redefinetrial(cfg, rawData);

Another step is to identify and remove artificial trials from the data, as they would adulterate

the analysis results. Artifacts emerge from eye blinks, muscle contractions or MEG SQUID

jumps and could be identified by thresholding the data. The following code shows how MEG

SQUID jump artifacts are removable.

Page 21: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

20

% Identify and Remove Artifacts

cfg.artfctdef.zvalue.interactive = 'yes';

[cfg, artifact_jump] = ft_artifact_zvalue(cfg);

cfg.artfctreject = 'complete';

cfg.artfactdef.zvalue.artifact = artifact_jump;

cfg = ft_rejectartifact(cfg);

In order to get a good signal to noise ratio it is advisable to apply different filters and some

additional pre-processing steps to the raw data. For example, the notch filter is useful to

remove line voltage frequency (50 Hz) and its harmonics. In addition, a bandpass filter and a

baseline correction could be applied to achieve clear data and remove background noise.

% Apply Filters

cfg.bsfilter = 'yes';

fg.bpfilter = 'yes';

cfg.demean = 'yes';

cfg.baselinewindow = [-0.075 -0.025];

avgData = ft_preprocessing(cfg, data);

The pre-processed trials from the same condition (left or right trigger/ wrist stimulation) can

be averaged by timelockanalysis. Afterwards there are different functions available to plot the

average.

% Timelockanalysis

cfg.trials = (avgData.trialinfo==1);

avgDataTrial1 = ft_timelockanalysis(cfg, avgData);

Page 22: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

21

In a butterfly plot, all channels are plotted on top of each other. It can be useful to identify

peaks and evaluate data quality. A topo plot depicts the topographic distribution over the

head. In this way, event-related potentials become visible for a given latency.

Magnetic Resonance Imaging Data

A T1-weighted (T1w-) MRI scan was acquired for each subject. For this purpose, a 3 Tesla

scanner (SIEMENS, Prisma Fit) was available. A 3D-T1w gradient-echo pulse sequence with

inversion prepulses, TR/TE/TI/FA= 2.3 ms/3.51 ms/ 1100 ms/ 8°, water selective excitation and

cubic voxels with 1 mm edge length was used. During the MR recordings, Gadolinium markers

were placed at the nasion (NAS) and at the pre-auricular points (right: RPA, left: LPA). These

markers generate bright spots in the MR images. This way, their position can be determined

and identified manually within the slices.

The MR images were aligned to the MEG head coordinate system in two different ways. A

rigid transformation matrix was calculated, using the positions of the Gadolinium markers

during the MRI recordings. Their position was aligned to the head localization coils inside the

MEG. In this case, the co-registration relies on matching three anatomical landmarks

(fiducials), which are identified in both coordinate systems.

% Registration with Fiducials

cfg = [];

cfg.method = 'interactive';

mri = ft_volumerealign(cfg, mri);

This frequently used approach will be called fiducial based matching (FBM) in the following.

For the second method a surface digitization was performed using a Polhemus digitizer. The

positions of 74 electrodes (10-10 system) of an EEG sensor configuration as well as the region

around the eyes and the nose were recorded. Furthermore, the digitized head points include

the fiducials, positioned at the head localization points inside the MEG. Moreover, the scalp

surface was segmented by the individual MR images. The ICP algorithm was used to calculate

a transformation matrix which minimizes the distance between the digitized head points and

Page 23: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

22

the MRI segmented head surface. Consequently, this co-registration method uses two

individual surface descriptions (digitized head points and MRI segmented scalp surface) to

achieve an accurate matching. From here on this approach will be called surface based

matching (SBM).

% Registration with ICP

cfg = [];

cfg.method = 'headshape';

cfg.headshape.headshape = digitizedHeadPoints;

mri = ft_volumerealign(cfg, mri);

In the following, two sets of MRI scans are distinguished. The first one was co-registered to the

MEG data using the FBM co-registration procedure, while the SBM method was used for the

second MRI scans. The individual brain surface was segmented by both MRI data sets.

% Segmentation of MRI Scans

cfg = [];

cfg.spmversion = 'spm8';

cfg.brainsmooth = 5;

cfg.brainthreshold = 0.5;

cfg.downsample = 1;

cfg.output = 'brain';

segmentedmri = ft_volumesegment(cfg, mri);

Forward modelling

A head model is needed to compute the potential distribution on the scalp surface for a given

source. Several studies have shown that an accurate source localization depends on the quality

of this model. Subsequently to the MRI pre-processing steps, two different head models were

generated to analyze the MEG data for each segmentation: on the one hand a basic single

sphere (SinSp) head model, and on the other hand a realistic single shell volume (SinSh)

Page 24: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

23

conduction model. The head models were created after the brain had been segmented by the

anatomical MRI.

The first model uses a set of points, describing the brain surface, to fit a single sphere. The

surface points were gained from the segmented MRI scans.

% Generate SingleSphere Head Model

cfg = [];

cfg.method = 'singlesphere';

HeadModel = ft_prepare_headmodel(cfg, segmentedmri);

For each subject the sphere has an individual radius.

Table 4| Radii of the single sphere models in mm.

Subject Radius [mm]

I 69.65

II 70.87

III 71.61

IV 69.33

V 75.98

VI 67.60

VII 72.13

The second model is based on ‘The magnetic lead field theorem in the quasi-static

approximation and its use for magnetoencephalography forward calculation in realistic volume

conductors’ published by G. Nolte [Nolte2003]. A simple and fast MEG forward computation

for a realistically shaped surface of the brain is possible with this method.

% Generate SingleShell Head Model

cfg = [];

cfg.method = 'singleshell';

HeadModel = ft_prepare_headmodel(cfg, segmentedmri);

Page 25: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

24

In a next step a lead field is calculated for each head model. For this purpose, the forward

problem is solved for many dipole locations on a regular 3D grid. A grid with 2 mm resolution

was prepared for this study. Since the MRI and MEG data were co-registered due to MRI data

pre-processing, the calculated head models were already aligned to the MEG gradiometer

sensor positions. Moreover, the inverse computation data are needed, as they contain

information about the channels that should be included in the forward model computation.

Thus, the obtained data can be used to solve the forward problem and calculate a lead field.

Later on, the lead field is needed to solve the ill-posed inverse problem of source

reconstruction inside the brain volume.

% Generate SingleShell LeadField

cfg = [];

cfg.headmodel = HeadModel;

cfg.grid.resolution = 2;

[LeadField] = ft_prepare_leadfield(cfg, avgData);

In summary, four different forward solutions were calculated for each subject. In the

following they are defined as:

Table 5| Head model type and registration method, which were used for the different forward solutions.

Term Head Model Co-Registraion

SpF SinSp FBM

ShS SinSh SBM

ShF SinSh FBM

SpS SinSp SBM

Inverse Methods

Up to this point, the volume conduction models have been constructed and MEG data pre-

processing has been completed. Following this, it is possible to model the data with an

equivalent current dipole model. The inverse problem aims to reconstruct the underlying

current source from non-invasively measured magnetic potentials. For this purpose, the

results of a forward simulation are compared to the measured data. Firstly, the previously

prepared lead field is scanned with one dipole. Afterwards the selected function performs a

Page 26: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

25

non-linear fit. In that way the location is found where the dipole model explains the measured

MEG topography best. The dipole fit is performed for a given time point and optimizes position,

orientation and strength simultaneously. The result can be visualized in a figure which contains

the dipole and some selected slices of the anatomical MRI.

% Performe DipoleFit

cfg = [];

cfg.numdipoles = 1;

cfg.latency = [TimePoint];

cfg.headmodel = HeadModel;

cfg.grid = LeadField;

cfg.senstype = 'meg';

cfg.channel = HeadModel.label;

cfg.elec= GradiometerSensorPositions;

DipoleFit = ft_dipolefitting(cfg, avgDataTrial1);

Page 27: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

26

IV. Results This chapter presents the results which were obtained using the different co-registration

methods. Initially, typical results from MEG data pre-processing are depicted. Afterwards the

differences in forward modelling, gained after the SFM and SBM, are depicted for some

subjects. Finally, the dipole localization differences with regard to the head model and the co-

registration procedure are described.

MEG – Data Pre-Processing

The following plot shows the pre-processed MEG data from Subject VII for the second trigger.

A characteristic waveform and topography of a somatosensory response are visible. Figure 1

depicts a butterfly plot. All channels are plotted on top of each other, whereby the different

components from the somatosensory response become clear. At time 0.000 s an artifact,

caused by the stimulation, can be seen. Behind this, the P20, N30 and P45 components occur.

3.111 𝑒−13

−3.111 𝑒−13

0

−6.222 𝑒−13

0.001 0.002 0.003 0.004 0.005

Time [s]

Figure IV-1|Butterfly plot for the pre-processed and averaged MEG data of Subject VII. The plot shows the characteristic waveform of a somatosensory response.

Page 28: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

27

The topographic distribution for a given time point can be shown in a topo plot. The topo plots

for the P20 and N30 components are depicted in the following picture.

Forward Modelling

With regard to the co-registration of MRI and MEG data the head model position, relative to

the MEG sensor cap, changes slightly. This means that the source reconstruction result is

influenced by the co-registration. Since four different forward solutions were calculated, it is

possible to investigate two aspects. On the one hand, the head model caused changes can be

calculated, and on the other hand, the changes caused by co-registration.

Head Model

Depending on the used head model, different forward solutions are calculated. The following

figure shows both head models inside the MEG sensor cap. The SinSh head model is depicted

in blue, and the yellow sphere represents the SinSp head model. The MEG gradiometer sensor

positions are marked by black points. The figure contains the SinSp and SinSh head model for

Subject II and VII obtained after SBM co-registration. It is obvious that the SinSp head model

does not fit the brain surface perfectly. The sphere overestimates the brain especially in the

temporal region. In contrast, it does not represent the frontal and occipital part of the brain.

Figure IV-2| Topo plot for the P20 (left) and N30 (right) component of Subject VII. Blue depicts the negative potential and yellow the positive potential.

Page 29: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

28

The sphere fits the parietal lobe best, which is located behind the frontal lobe, at the top of

the brain. This area is responsible for reception and processing of sensory information.

Figure IV-3| Single sphere (yellow) and single shell (blue) volume conductor within the MEG sensor cap (black) for Subject

II (upper row) and VII (bottom row) obtained after SBM co-registration.

Registration Method

The first head model used for this study was a SinSp volume conductor. The sphere center is

shifted along the three space coordinates, caused by the co-registration procedure. In order

to determine the degree of change, the absolute difference of the origins positions is used.

The shift along each space dimension as well as the Euclidian distance between the sphere

origins are noted in Table 6. These values represent how much the MEG head coordinate

system is manipulated.

Page 30: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

29

Table 6| Euclidian distances and shift along the three space dimensions of the single sphere origin positions with regard to the co-registration method. The distances are given in mm.

Subject Distance s c l

I 1.93 0.70 1.75 0.40

II 8.52 0.43 1.32 8.41

III 3.05 2.62 0.42 1.50

IV 5.23 4.95 0.08 1.68

V 3.61 2.92 1.04 1.85

VI 9.15 8.12 3.50 2.36

VII 8.45 0.35 8.39 1.00

Table 7|Mean and Median values for the Euclidian distances and shift along the three space dimensions of the single sphere origin positions with regard to the co-registration method. The distances are given in mm.

Distance s c l

Mean 5,71 2,87 2,36 2,46

Median 5,23 2,62 1,32 1,68

As the results show, the SinSp model is mainly shifted along the sagittal axis for 4 subjects (III,

IV, V, VI). The largest impact on the coronal axis is visible for Subjects I and VII. Only for

Subject II an obvious change along the longitudinal axis occurs. The Euclidian distance between

the sphere origins varies from 1.93 to 9.15 mm. For Subject I the changes are less than 2 mm

in each direction. On a single occasion (Subject VI) a shift larger 2 mm emerged along two axes.

For all other subjects the changes varied from 0.08 to 1.85 mm in two dimensions and shifted

more than 2.36 mm along the third one. A difference of more than 8 mm along one axis was

observed for the Subjects II, VI and VII. On average a distance of 5 to 6 mm arose between the

sphere origins with regard to the co-registration method. The mean shift along each space

dimension is about 2 to 3 mm. Nevertheless, it should be noted that the median value is much

smaller along the coronal and longitudinal axis.

The co-registration method has the same impact on the SinSh model as on the SinSp model.

The following figure depicts the differences caused by the method used for MRI and MEG data

co-registration. Obviously, the single shell volume conductor position changes inside the MEG

sensor cap with regard to the registration method. The chosen examples are the head models

for Subjects II, VI and VII. In this selection, each one illustrates a shift larger 8 mm along one

Page 31: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

30

space coordinate. The red shell represents the head model position obtained after FBM, while

the green one was obtained after SBM. The black points mark the MEG gradiometer sensor

positions.

Figure IV-4|Divergent positions of the single shell volume conductor within the MEG sensor cap (black) caused by different registration methods for MRI and MEG data. Red: head model position obtained after FBM registration, green: head model position obtained after SBM registration. Upper row: Subject II; head model is mainly shifted along the longitudinal axis. Middle row: Subject VI; head model is mainly shifted along the sagittal axis. Bottom row: Subject VII head model is mainly shifted along the coronal axis.

Page 32: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

31

Inverse Solution

The inverse solution depends on the forward model. This study considers two different factors,

which seem to affect the inverse solution. Changes in dipole localization are traceable to the

head model type or to the co-registration procedure. First, the differences in dipole localization

caused by the head model are represented. Afterwards, changes caused by the co-registration

method are shown. For Subject II two MEG data sets with the same trigger were available.

Therefore, the following results for this subject do not contain dipole A, but twice times

dipole B (termed IIa and IIb).

Differences Caused by Head Model

Two different head models were used to solve the forward problem. This section shows how

much the type of head model influences the dipole localization. Therefore, a dipole fit was

performed with each forward model. The dipole localizations obtained with different head

models, but identical co-registration methods were compared (SpF compared to ShF and SpS

compared to ShS; cf. table 5). The following tables show the shift along each space dimension

as well as the Euclidian distance between the dipoles. As reference the SinSh dipole position is

used. First the results for the first (left) trigger are depicted and afterwards those for the

second (right) one. Each table contrasts the distance obtained with the FBM and the SBM co-

registration, respectively. Therefore, they contain the Euclidian distance between the dipoles,

as well as the shift along the three space dimensions.

Table 8| Euclidian distances and shift along the three space dimensions of the first dipole position with regard to the different head models for both registration methods. The distances are given in mm.

FBM SBM

Subject Dipole A s c l s c l

I 4.06 1.12 -2.90 2.60 4.12 1.47 -2.88 2.56

III 1.14 0.45 -0.80 0.68 1.45 0.13 -0.47 1.36

IV 3.30 1.40 -2.36 1.84 3.20 1.79 -2.09 1.65

V 1.09 1.01 -0.08 0.42 1.54 0.94 -0.16 1.20

VI 5.13 0.34 -4.88 1.52 4.98 1.96 -4.50 0.85

VII 13.42 -6.05 -11.75 -2.32 12.27 -5.12 -10.38 -4.06

Page 33: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

32

Table 9|Euclidian distances and shift along the three space dimensions of the second dipole position with regard to the different head models for both registration methods. The distances are given in mm.

FBM SBM

Subject Dipole B s c l s c l

I 2.66 1.35 1.82 1.38 2.76 1.53 1.64 1.60

IIa 1.37 0.19 -0.89 1.03 1.39 -0.01 -0.51 1.29

IIb 0.93 -0.41 -0.82 0.17 0.64 -0.50 -0.40 -0.07

III 3.01 0.88 1.23 2.60 3.18 1.09 0.94 2.84

IV 2.82 1.21 1.75 1.84 2.89 0.94 1.53 2.26

V 2.04 1.45 0.95 1.08 2.17 1.43 0.75 1.46

VI 1.67 1.34 -0.22 0.98 1.57 0.47 -0.04 1.50

VII 8.37 -3.89 7.33 1.04 10.28 -5.53 8.29 2.52

The Euclidian distance between the dipole locations varies between 0.64 and 13.42 mm. For

most subjects the dipole position changes less than 5 mm with regard to the type of head

model. Predominantly the changes along the space directions are smaller than 2 mm. Subject

VII constitutes an exception, here the differences are larger than 8 mm. In this case the dipoles

are shifted mainly along the sagittal and coronal axes. Overall the dipoles are localized in more

superior and anterior positions if a SinSh head model is used. This is not true of the source

reconstructions of Subject II and Subject VII. In these cases the dipoles also shift in the other

direction. Moreover, in most cases the dipoles are located more laterally, provided the SinSh

head model is used. Again Subject II and VI constitute an exception. But in these cases, the

dipoles are shifted less than 1 mm along the coronal axis.

The data give some indication whether the co-registration method has an impact on the

variation in dipole localization with respect to the head model. There is only one case where

the dipole shifts in a different direction depending on the used co-registration method

(Subject IIb). The distances between the dipole localization obtained with the different head

models are very similar. Thus, the variations between the inverse solution obtained with the

SinSp and SinSh head models are hardly altered by the registration method.

Figure 5 displays the dipole locations for the different head models for the second dipole of

Subject II (dipole B IIb) and the first dipole for Subject VII, both obtained with SBM co-

Page 34: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

33

registration. The ShS dipole is depicted in blue and the yellow one represents the dipole which

was calculated by means of the SpS forward solution.

Figure IV-5|Impact of different head models on dipole location for somatosensory evoked fields. The dipole locations for the different head models (yellow: single sphere and blue: single shell) obtained after SBM registration are plotted on T1w-MRI slices. The dipole location based on the single shell was used for MRI slice selection and the other dipole was projected onto these slices. Dipole B for Subjects IIb (upper row) and VII (bottom row).

Differences Caused by Co-Registration Method

With regard to the co-registration method different dipole localizations were calculated. This

section illustrates the differences caused by the MRI - MEG data co-registration procedure. For

this purpose, the dipole positions, gained with SpF and SpS forward models, as well as those

gained with the ShF and ShS forward models are compared to each other. As reference the

SBM dipole position is used. Again, one table depicts the results for the left trigger and one

those for the right trigger. Each table contrasts the distance obtained with the SinSh and SinSp

head model. The Euclidian distance between the localized sources and the shift along the three

space dimensions is depicted for all dipoles.

Page 35: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

34

Table 10|Euclidian distances and shift along the three space dimensions of the first dipole position with regard to the different registration methods for both head models. The distances are given in mm.

Table 11|Euclidian distances and shift along the three space dimensions of the second dipole position with regard to the different registration methods for both head models. The distances are given in mm.

SinSh SinSp

Subject Dipole B s c l s c L

I 4.5 -0.87 -4.1 1.63 4.3 -1.04 -3.93 1.41

IIa 10.23 4.84 -0.8 8.97 10.13 5.04 -1.17 8.71

IIb 10.36 4.76 -0.96 9.15 10.66 4.85 -1.38 9.39

III 6.37 -6.25 1.09 -0.52 6.64 -6.45 1.39 -0.76

IV 8.02 -7.75 0.5 2.02 7.68 -7.48 0.71 1.6

V 4.29 -3.28 -1.73 2.16 4.01 -3.26 -1.52 1.77

VI 9.43 -8.49 -3.72 1.69 8.64 -7.62 -3.90 1.17

VII 12.61 -0.74 -11.77 4.45 13.1 0.9 -12.73 2.97

Tables 10 and 11 list the Euclidian distances between the dipole locations obtained with the

different registration procedures. All results show that the co-registration has a distinct impact

on the source localization. The smallest Euclidian distance amounting to approximately 4.0

mm, and the largest difference with a value of 16.76 mm were observed for the SinSp head

model. This means, the distance between the reconstructed sources ranges from 4.01 to 16.76

mm with regard to the registration method. In contrast, the distances within the SinSh model

vary between 4.29 and 14.99 mm. Nevertheless, it is discernible that the different head models

hardly influence the distance between the dipoles. This is reflected by very similar values for

the distances caused by the registration procedure within the SinSp and SinSh head model. It

should be noted that the Euclidian distances calculated with regard to the head models are

smaller than those caused by the co-registration. While the dipole positions changed less than

SinSh SinSp

Subject Dipole A s c l s c l

I 5.07 -3.29 -3.65 -1.24 5.31 -3.64 -3.68 -1.2

III 6.87 -5.81 0.4 3.63 6.24 -5.5 0.06 2.95

IV 10.47 -10.28 -0.62 1.9 10.91 -10.67 -0.89 2.09

V 7.04 -6.2 -2.61 2.06 6.76 -6.14 -2.53 1.28

VI 14.99 -14.12 -3.66 3.43 16.76 -15.74 -4.04 4.11

VII 12.38 0.16 -12.07 -2.75 13.5 -0.77 -13.44 -1.02

Page 36: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

35

5 mm for most subjects with the different head model types, the differences caused by co-

registration were in most instances larger than 5 mm. Only the first dipole for Subject VII

constitutes an exception. Here, the reconstructed sources have a distance of 13.42 mm with

regard to the different head models after FBM. But for the SinSh head model the different co-

registrations generate a distance of 12.38 mm.

Figure 6 shows the dipole locations for all subjects except for Subject II. The red points

represent the dipole locations, obtained after FBM co-registration. The dipole locations after

SBM method are depicted as green dots. It can be seen that the red point cloud is located more

frontally than the green one. In addition, the green dots seem to be placed in a more lateral

position in many cases.

Figure IV-6|Dipole localizations for all subjects, obtained with the different co-registration procedures (red: based on three AL and green: IM). The IM based dipoles are located in more lateral and posterior positions in most cases.

Page 37: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

36

In reference to table 10 and 11 it becomes clear that most dipoles are located in a more

posterior position and higher after SBM registration has been applied.

Exceptions are Subjects I, VII (dipole A) and III (dipole B), since those dipoles are located lower.

Moreover, the dipoles of Subject II are shifted about 5 mm to the front after the SBM

registration procedure (not depicted in figure 6). An obscure effect is visible on the dipoles of

Subject VII. In this particular case the dipole shifts in a different direction depending on the

used head model. Dipole A is located in a more frontal position in the SinSh head model and

in a more posterior position in the SinSp head model when MRI and MEG data have been

co-registered by SBM. In contrast it is the other way round for dipole B. This one is located

more to the front in the SinSp head model and to the back in the SinSh head model after the

SBM registration has been applied. While both dipoles (A and B) were located more laterally

with regard to the head model, the co-registration has a different effect. For each subject the

sources are shifted in one direction along the coronal axis. In most cases the dipole shifted to

the right if the SBM registration method was used. For Subject III both dipoles are located to

the left and for Subject IV the dipoles are located more laterally after the FBM has been applied

to the MEG and MRI data.

The following figures depict the positions of dipole B for Subjects II, VI and VII. In this manner

the distance caused by the registration procedure is illustrated. Again, the red points represent

the location obtained after MRI and MEG data were registered by FBM. In contrast, the green

points mark the location calculated after SBM of the MRI-segmented scalp surface and the

digitized points of the scalp surface. For each example, the dipole is furthest displaced along

one space axis. In addition, slight changes along the other two axes are discernible. The first

row illustrates the dipoles calculated with the SinSh head model while the second depicts the

positions obtained with the SinSp head model. The dipole location based on SBM

co-registration was used for MRI slice selection and the other dipole was projected onto these

slices. Since the dipole position changes slightly with regard to the head model for Subjects II

and VI (see Table 8 and 9) there are hardly any differences between the slices, depicted in the

first and second row. In contrast, for Subject VII the head model had a strong impact on the

dipole position, which is also visible in the slices.

Page 38: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

37

Page 39: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

38

Figure IV-7| Impact of different MEG/MRI co-registration methods on dipole location for somatosensory evoked fields for different subjects. The dipole locations for the different registration methods (red: SBM and green: SBM) are plotted on T1w-MRI slices. The dipole location based on the single shell was used for MRI slice selection and the other dipole was

projected onto these slices. The dipoles for both, the single shell head model (upper row) and single sphere head model (bottom row) are depicted.

Page 40: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

39

V. Discussion A precise forward solution influences the achievable accuracy in the inverse problem. In that

regard the impact of forward model errors on MEG source localization was considered in this

study. For this purpose, the consequences of different MEG – MRI co-registration methods on

source localization of somatosensory evoked potentials were investigated. The co-registration

determines the MEG gradiometer sensor positions relative to the head, consequently it has an

effect on the forward and therefore the inverse solution. On the one hand the MR images were

aligned to the MEG head coordinate system using the positions of three anatomical landmarks

(FBM), on the other hand the ICP algorithm was used to calculate a transformation matrix

(SBM).

To examine the effect of the co-registration method on the inverse solution the shift in source

localization was calculated. Moreover, two different head models were used. In this manner

the impact of the co-registration method was matched against the impact of different head

model types on the dipole localization. It was shown that errors in MEG gradiometer sensor

localization influence source reconstruction more than the type of head model. Apart from

one subject, the dipole position changed less than 5 mm with the type of head model. In

contrast, the Euclidian distances between the dipole locations obtained with the different

registration procedures were larger than 5 mm in most instances. This means that an

inaccurate MEG – MRI co-registration leads to mislocalization of reconstructed sources and

should be taken into account when working with somatosensory evoked potentials.

Head Models

In a first step, the different head models were compared with each other, since they influence

the forward model. Obviously, the SinSp model does not represent the entire individual brain

appropriately. Particularly, the temporal, frontal and occipital region of the brain are not

approximated properly. However, the parietal lobe is represented quite well. This lobe is

located at the top of the brain and has a spherical shape. Somatosensory evoked potentials

are processed in the primary somatosensory cortex which is localized to the parietal scalp

region. Due to this fact the head model might be sufficient to generate an appropriate forward

Page 41: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

40

model. The SinSh model, on the other hand, is calculated with regard to the individual brain

shape, therefore it is supposed to afford a more accurate forward solution.

Section III.III.I presented how the different head models influence the inverse solution.

Although the results showed some systematic effects, they were very slight in most cases.

Crouzeix et al. figured out that a SinSp model causes model-based errors by 2.5 mm and the

SinSh model by 2.4 mm for simulated MEG source dipoles in the upper part of the head

[Crouzeix1999]. Granted that the measured data exhibit similar errors as simulated data, the

results presented by Crouzeix et al. are consistent with the perceptions in this study.

The following figure depicts both sources, which were reconstructed for Subject III. It is

recognizable that the sources are located next to each other. The dipoles calculated by means

of the SpF forward solution are depicted in yellow, while the ShF dipoles are represented in

blue. The source locations are plotted on a T1w-MRI slice. The longitudinal and coronal

coordinates from dipole B were used for MRI slice selection and the other dipoles were

projected onto these slices.

It is discernible that the dipoles which were obtained with the SinSh head model are localized

more laterally and to the front than the other ones. Besides, a shift upwards can be seen.

Nevertheless, the effects are very small. For this reason, the SinSp model seems to be an

Figure V-1|Subject III. Both dipole locations for the different head models (yellow: single sphere and blue: single shell) obtained after FBM registration. The dipole locations, obtained with the SinSh head model are localized in more lateral and anterior position than the other ones.

Page 42: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

41

acceptable model to reconstruct somatosensory evoked potentials. This outcome was

expected, as several studies have shown that MEG is assumed to be less affected by a

simplified modelling of the human head [Cho2015].

Additionally, it was examined if the co-registration method changes the impact of the head

model. Therefore, the Euclidian distances between the dipoles, obtained after FBM and SBM

were applied, can be compared. The distances between the dipoles do not vary much with

regard to the registration method. Due to this fact, there is a strong case for believing that the

differences caused by the head model are almost independent of the MEG gradiometer sensor

positions relative to the head. Admittedly, this statement is restricted to source localization of

somatosensory evoked potentials.

Registration Method

The impact of the registration method on the forward model was represented as the degree

of change of the SinSp origins positions. It turns out that the head model shifted by 1.93 to

9.15 mm, therefore the coordinates for each MRI voxel within the source space also changed.

It should be noted that the head models are shifted along one space dimension predominantly.

On average the co-registration method caused a MEG gradiometer sensor positions

displacement of 5 to 6 mm. As a consequence, different forward models have been obtained

and the sensor displacement influences the inverse solution. The following figure depicts the

correlation between displacement of the sphere origin and the effect on the reconstructed

source. Therefore, the Euclidian distance between the localized sources and the shift along the

three space dimensions is plotted against the change of the SinSp origins positions. Each dot

represents the values (of dipole B) for one subject.

In most cases, the more the SinSp origin was shifted, the larger the Euclidian distance between

the reconstructed sources. However, this is not true if the individual space directions are taken

into account. The dipole might be obviously displaced along one coordinate, although the head

model was barely affected in this direction in space by the co-registration method. Take, for

example, the case of Subject IIb (sagittal axis) or VII (longitudinal axis).

Page 43: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

42

It has already been taken into account that each sphere origin is mainly shifted along one space

dimension. The reconstructed source is also mostly displaced in the same dimension. For the

coronal axes and longitudinal axes, the effects seem to be slight in most cases. In contrast, for

the sagittal axis the effects differ a lot between the subjects.

Previous studies have shown that source localization of somatosensory evoked potentials is

barely affected by the type of head model. By contrast, studies dealing with the impact of EEG

electrode localization errors on source localization concluded that superficial dipoles are

closest to the EEG electrode positions. Therefore, they are most affected by the co-registration

method [Zeynep2013].

In this context two types of studies can be differentiated. Firstly, those which examine the

effect of random electrode displacement. Sengül and Baysal reported that an average of 5 mm

Figure V-2| Correlation between displacement of the sphere origin and the effect on the reconstructed source. The Euclidian distance between the localized sources and the shift along the three space dimensions are plotted against the change of the SinSp origins positions. Each dot represents the values (of dipole B) for one subject. The distances are given in mm.

Page 44: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

43

EEG electrode mislocalization causes a shift of 4.98 mm in source localization of somatosensory

evoked potentials [Sengül2012]. In contrast Zeynep and Scott shifted the EEG electrode

positions in one direction (once 5 mm backwards and once 5 mm to the left). Thereby

localization errors up to 12 mm were observed for superficial dipoles. For dipoles in the parietal

region a mean error of 6.2 mm (for electrodes shifted backwards) and of 2.6 mm (for left

shifted electrodes) was reported. The maximum source localization error was up to 9.1/8.3

mm (for backward/left shifted electrodes) [Zeynep2013].

In this study, the impact of MEG gradiometer sensor positions displacement is taken into

account. Section III.III.II represented the effect of co-registration errors on source localization.

If the sensor positions shifted up to 5 mm along each axis, a maximum localization error of

8.64 mm (Subject IV) was observed. These results are consistent with those by Zeynep and

Scott, who reported a maximum source localization error of 9.1 mm for superficial dipoles in

the parietal region [Zeynep2013]. For those subjects where a shift larger than 8 mm along one

space coordinate was detected (Subjects II, VI and VII), the dipoles changed position by up to

13 mm.

This means that MEG gradiometer sensor positions displacement has similar effects on source

reconstruction of somatosensory evoked potentials as EEG electrode mislocalization.

Page 45: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

44

VI. Conclusion and Outlook In this study the effects of different head models and co-registration methods on the MEG

inverse problem were examined. Taken as a whole, it was shown that source localization

differences, caused by the co-registration method, are larger than those evoked by different

head models. A range of studies addressed the importance of head model accuracy for source

reconstruction. It became apparent that an accurate volume conductor model is less important

for MEG than for EEG forward solutions. The permeability profile for MEG is nearly uniform

throughout the hole head (brain, skull, skin), thus simple volume conductor models are

sufficient for the forward calculation. With this in view, it is not surprising that the source

localizations are hardly affected by the different head models.

As opposed to this, the MEG gradiometer sensor positions have a distinct effect on the

reconstructed sources. Previously reported effects of EEG electrode mislocalization on source

localization are in accordance with the presented results. This implies that an accurate

knowledge of the sensor or electrode positions relative to the head is necessary to reconstruct

neuronal activity for MEG or EEG measurements.

Following this thesis it would be interesting to investigate the effect of different co-registration

methods on source localizations across the brain space. In this way it would be possible to

determine the effect of MEG gradiometer sensor mislocalization in different brain regions.

Moreover, an interesting question is, if the co-registration method influences the differences

in EEG and MEG source reconstructions. For that purpose, simultaneously acquired MEG and

EEG data should be analyzed with respect to the different co-registration methods.

Subsequently it would be possible to compare the distances between the dipoles. Possibly, the

SBM registration reduces the gap between MEG and EEG source.

Page 46: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

45

VII. Appendix I

List of References

[Cho2015] Cho, J.H.; Vorwerk, J.; Wolters, C.H., and Knösche, T.R. (2015): Influence

of the head model on EEG and MEG source connectivity analysis.

[Crouzeix1999] Crouzeix, A.; Yvert, B.; Bertrand, O.; Pernier, J. (1999): An evaluation of

dipole reconstruction accuracy with spherical and realistic head models in MEG. In: Clinical

neurophysiology: official journal of the International Federation of Clinical Neurophysiology

110 (12), S. 2176–2188.

[Kringelbach2010] Kringelbach, M.L.; Hansen, P.C.; Salmelin, R. (2010) MEG. An

introduction to methods. New York, Oxford University Press. ISBN: 9780195307238.

[Martin1991] Martin JH. The collective electrical behavior of cortical neurons: the

electroencephalogram and the mechanisms of epilepsy. In: Kandel ER, Schwartz JH, Jessel TM,

eds. Principles of neural science. Norwalk: Appleton and Lange, 1991:777–91.

[Nolte2003] Nolte G. (2003) The magnetic lead field theorem in the quasi-static

approximation and its use for magnetoencephalography forward calculation in realistic volume

conductors. Phys Med Biol. 2003 Nov 21;48(22):3637-52.

[Nolting2011] Nolting, W. (2011) Grundkurs Theoretische Physik 3. Elektrodynamik. 9.,

updated Version. Springer-Verlag Berlin Heidelberg, http://dx.doi.org/10.1007/978-3-642-

13449-4.

[Nuwer1998] Nuwer, M. (1998) Fundamentals of evoked potentials and common

clinical applications today. Electroencephalography and Clinical Neurophysiology.

[Oostenveld2011] Oostenveld, R.; Fries, P.; Maris, E.; Schoffelen, J.-M. (2011): FieldTrip:

Open source software for advanced analysis of MEG, EEG, and invasive electrophysiological

data. In: Comput Intell Neurosci 2011, S. 156869. DOI: 10.1155/2011/156869.

[Plonsey1967] Plonsey, R. und Heppner, D. (1967): Considerations on quasi-stationarity

in electrophysiological systems. In: The Bulletin of Mathematical Biophysics 29.4, S. 657–664.

[Schmidt1990] Schmidt, R.F. and Thews, G.R.A.: Physiologie des Menschen. 24.

Springer-Verlag Berlin Heidelberg, 1990.

Page 47: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

46

[Sengül2012] Sengül, G.; Baysal, U. (2012): Determination of measurement noise,

conductivity errors and electrode mislocalization effects to somatosensory dipole localization.

In: Biomed Res- India 2012; 23 (4): 518-588. ISSN 0970-938X.

[Singh1997] Singh, K.D., et al. Evaluation of MRI-MEG/EEG co-registration strategies

using Monte Carlo simulation, Electroencephalogr. Clin. Neurophysio., 1997, 102: 81-85.

[Weishaupt2006] Weishaupt, D.; Köchli, V.D.; Marincek B. (2006) Wie funktioniert MRI? :

Eine Einführung in Physik und Funktionsweise der Magnetresonanzbildgebung, Springer.

[Zeynep2013] Zeynep, A.A.; Scott, M. (2013): Effects of forward model errors on EEG

source localization. In: Brain Topography 26 (3), DOI: 10.1007/s10548-012-0274-6.

List of Tables and Figures

Table 1| Term, location and function of the anatomical regions of the cerebral cortex. .......... 9

Table 2|Layers of the neocortex and typical cells. .................................................................... 10

Table 3| Axes definition for the MEG head coordinate system. ............................................... 16

Table 4| Radii of the single sphere models in mm. ................................................................... 23

Table 5| Head model type and registration method, which were used for the different

forward solutions....................................................................................................................... 24

Figure IV-1|Butterfly plot for the pre-processed and averaged MEG data of Subject VII. The

plot shows the characteristic waveform of a somatosensory response. .................................. 26

Figure IV-2| Topo plot for the P20 (left) and N30 (right) component of Subject VII. Blue

depicts the negative potential and yellow the positive potential. ........................................... 27

Figure IV-3| Single sphere (yellow) and single shell (blue) volume conductor within the MEG

sensor cap (black) for Subject II (upper row) and VII (bottom row) obtained after SBM co-

registration. ............................................................................................................................... 28

Table 6| Euclidian distances and shift along the three space dimensions of the single sphere

origin positions with regard to the co-registration method. The distances are given in mm. . 29

Table 7|Mean and Median values for the Euclidian distances and shift along the three space

dimensions of the single sphere origin positions with regard to the co-registration method.

The distances are given in mm. ................................................................................................. 29

Page 48: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

47

Figure IV-4|Divergent positions of the single shell volume conductor within the MEG sensor

cap (black) caused by different registration methods for MRI and MEG data. Red: head model

position obtained after FBM registration, green: head model position obtained after SBM

registration. Upper row: Subject II; head model is mainly shifted along the longitudinal axis.

Middle row: Subject VI; head model is mainly shifted along the sagittal axis. Bottom row:

Subject VII head model is mainly shifted along the coronal axis. ............................................. 30

Table 8| Euclidian distances and shift along the three space dimensions of the first dipole

position with regard to the different head models for both registration methods. The

distances are given in mm. ........................................................................................................ 31

Table 9|Euclidian distances and shift along the three space dimensions of the second dipole

position with regard to the different head models for both registration methods. The

distances are given in mm. ........................................................................................................ 32

Figure IV-5|Impact of different head models on dipole location for somatosensory evoked

fields. The dipole locations for the different head models (yellow: single sphere and blue:

single shell) obtained after SBM registration are plotted on T1w-MRI slices. The dipole

location based on the single shell was used for MRI slice selection and the other dipole was

projected onto these slices. Dipole B for Subjects IIb (upper row) and VII (bottom row)........ 33

Table 10|Euclidian distances and shift along the three space dimensions of the first dipole

position with regard to the different registration methods for both head models. The

distances are given in mm. ........................................................................................................ 34

Table 11|Euclidian distances and shift along the three space dimensions of the second dipole

position with regard to the different registration methods for both head models. The

distances are given in mm. ........................................................................................................ 34

Figure IV-6|Dipole localizations for all subjects, obtained with the different co-registration

procedures (red: based on three AL and green: IM). The IM based dipoles are located in more

lateral and posterior positions in most cases. ........................................................................... 35

................................................................................................................................................... 37

Figure IV-7| Impact of different MEG/MRI co-registration methods on dipole location for

somatosensory evoked fields for different subjects. The dipole locations for the different

Page 49: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

48

registration methods (red: SBM and green: SBM) are plotted on T1w-MRI slices. The dipole

location based on the single shell was used for MRI slice selection and the other dipole was

projected onto these slices. The dipoles for both, the single shell head model (upper row) and

single sphere head model (bottom row) are depicted. ............................................................ 38

Figure V-1|Subject III. Both dipole locations for the different head models (yellow: single

sphere and blue: single shell) obtained after FBM registration. The dipole locations, obtained

with the SinSh head model are localized in more lateral and anterior position than the other

ones. .......................................................................................................................................... 40

Figure V-2| Correlation between displacement of the sphere origin and the effect on the

reconstructed source. The Euclidian distance between the localized sources and the shift

along the three space dimensions are plotted against the change of the SinSp origins

positions. Each dot represents the values (of dipole B) for one subject. The distances are

given in mm. .............................................................................................................................. 42

Page 50: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

49

Part II: Implementation of a Brainstorm Process for Chamfer Distance based MEG - MRI Co-Registration

VIII. Summary The following report describes a fully automated surface matching approach for the

registration of MEG/EEG and MRI data. The whole method is implemented as a process for the

collaborative, open-source application Brainstorm [Tadel2011]. The software offers a flexible

plug-in structure, whereby the process function can be run from the Brainstorm interface.

The process is based on the work of Julie Verreault [Verreault2012], who implemented a

similar co-registration procedure, which was presented by Schwartz et al. [Schwartz1996].

Moreover, she pointed out which parts should be replaced by tools from the Brainstorm

software. In addition to the aspects mentioned by Julie Verreault, the process was modified

with a view to improving the results and reducing processing time.

The automatic approach matches two surface descriptions in order to co-register MEG/EEG

and MRI data. For this purpose, the skin surface is segmented by the MRI. A binary volume is

achieved, which represents the skin surface. Based on this volume a distance transform

computation, presented by Borgefors [Borgefors1986], is performed. During this, a map is

calculated which contains the distance from the skin surface for each voxel. The second surface

description is a 3D point cloud, which represents the skin surface. For the registration process,

the distance between the two surfaces (skin surface within the MRI and 3D point cloud) is

calculated, using the distance transform volume. In order to minimize the distance between

the 3D point cloud and skin surface, extracted by the MRI, a simplex algorithm is used. This

algorithm minimizes the mean distance between the two surfaces. Since the algorithm can get

stuck in local minima, a reasonable pre-registration is crucial. For this purpose, the surface

descriptions are pre-aligned by three anatomical markers. Moreover, the minimization

algorithm is launched with several, slightly different, starting points to achieve an optimal

result.

Primary simulation studies have shown that the algorithm generates reasonable results. But

there are several parameters which might be improved over time. Furthermore, it might be

useful to smooth the 3D point cloud, in order to optimize the process.

Page 51: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

50

IX. Introduction Background information on magnetic resonance imaging (MRI) and magnetoencephalography

(MEG) is given in part I of this thesis. Furthermore, the necessity of an accurate co-registration

was addressed before. For this reason, these aspects are not taken up again. Instead, this

chapter presents the most important aspects of the implemented process. Therefore, the

different steps of the automatic co-registration procedure are described.

Data Upload

Before the co-registration procedure can start, the necessary data need to be imported to the

MATLAB workspace. The process is launched from the Brainstorm interface, for this reason all

data should be available within the Brainstorm database. The process uses an anatomical MRI,

a scalp surface and a channel file for a given study. The scalp surface (also called head mask)

represents the skin surface and is segmented by the anatomical MRI. It can be generated by

Brainstorm and is used to calculate a binary image of the skin. The channel file contains the

EEG electrode and MEG gradiometer positions, which should be co-registered to the head

surface. The process can use EEG electrode positions or additional head points for the co-

registration procedure. If the study does not contain any EEG data, it is crucial to upload

additional head points.

Figure IX-1|Flow diagram of data importation. All data are imported for the Brainstorm database.

Page 52: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

51

Distance Transform Computation

In a second step, the process computes the so-called chamfer volume. This volume represents

the distance from each voxel to the skin surface. The method was published by Borgefors in

1986 [Borgefors1986]. The chamfer volume is computed once for a given subject. If there are

several studies present for one subject, the distance volume will not be computed again for

each study. Instead, the chamfer map which was computed for the first will be imported.

Figure IX-2|Flow diagram of chamfer map computation. The chamfer map is not calculated, if one is available within the Brainstorm database.

The binary image consists of feature (representing the skin surface) and non-feature pixels.

The chamfer map represents the distance to the nearest feature pixel for all non-feature pixels.

In order to compute these distances in a time-efficient manner the algorithm considers only

small neighborhoods. For the given distance map, local neighborhoods of size 3 x 3 pixels are

used. This means that the Euclidian distance for each voxel from the skin surface is

approximated with the help of a 3 x 3 mask [Borgefors1986].

D1: 3 D2: 4 D3: 5

D3 D2 D3

D2 D1 D2

D3 D2 D3 D2 D1 D2

D1 0 D1

D2 D1 D2 D3 D2 D3

D2 D1 D2

D3 D2 D3 Figure IX-3| Three-dimension chamfer mask of length 3.

Page 53: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

52

Minimization Algorithm

Based on the chamfer distance map, the mean distance between the skin surface and the 3D

point cloud is calculated. Schwartz et al. reported that the standard deviation associated with

the mean distance did not achieve better results than the square mean distance

[Schwartz1996]. The square mean distance is defined as cost function, although it is an implicit

cost function. In order to minimize this cost function an optimization method is used, which

avoids the computation of the derivate. Therefore, an algorithm is needed which searches local

minima by using function value evaluations at different positions. While Schwartz et al. used

the Powell algorithm, the presented process uses a simplex algorithm.

In order to launch the algorithm, a 6D starting point is needed. The vector contains the three

translation and three rotation parameters. In the end, the algorithm returns an optimized

vector, which contains optimized values for the six motion parameters.

(

𝑖𝑛𝑖𝑡𝑡𝑥𝑖𝑛𝑖𝑡𝑡𝑦𝑖𝑛𝑖𝑡𝑡𝑧𝑖𝑛𝑖𝑡𝑟𝑥𝑖𝑛𝑖𝑡𝑟𝑦𝑖𝑛𝑖𝑡𝑟𝑧)

(

𝑜𝑝𝑡𝑡𝑥𝑜𝑝𝑡𝑡𝑦𝑜𝑝𝑡𝑡𝑧𝑜𝑝𝑡𝑟𝑥𝑜𝑝𝑡𝑟𝑦𝑜𝑝𝑡𝑟𝑧)

Figure IX-4| General notation of the input and output vectors for the minimization algorithm.

Depending on the start position, the algorithm might find different local minima and different

optimized motion parameters. For this reason, the process uses multiple starting points for the

purpose of finding a good local minimum, or even better, the global minimum. Once, the initial

pre-registration, based on the three anatomical landmarks (see FBM in part I of this thesis) is

used as initial point. The pre-registered point cloud is moved slightly along and around the

different space dimensions to create new starting points for the optimization algorithm. By

doing so, a local grid search is performed in order to find the global minima. At this point the

process starts from 625 different starting points.

(

−0.002500000 )

(

−0.001500000 )

(

000000)

(

0.001500000 )

(

0.002500000 )

Figure IX-5| Sample set of input vectors. The starting point is translated along the x-axis. Dimensions are in [m].

Page 54: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

53

For each starting point a set of motion parameters is calculated by the minimization algorithm.

The set consists of six parameters, three for translation and three for rotation. These

parameters are used later on to calculate the transformation matrix. The optimal set of motion

parameters is selected, by evaluating the cost function value. The assumption is that the best

motion parameters generate the smallest cost function.

The optimal set of motion parameters is used to create six additional, random starting points.

Each of the six random starting points consists of five random values and one parameter from

the optimal parameter set.

(

𝑜𝑝𝑡𝑡𝑥𝑟𝑎𝑛𝑑𝑡𝑦𝑟𝑎𝑛𝑑𝑡𝑧𝑟𝑎𝑛𝑑𝑟𝑥𝑟𝑎𝑛𝑑𝑟𝑦𝑟𝑎𝑛𝑑𝑟𝑧)

(

𝑟𝑎𝑛𝑑𝑡𝑥𝑜𝑝𝑡𝑡𝑦𝑟𝑎𝑛𝑑𝑡𝑧𝑟𝑎𝑛𝑑𝑟𝑥𝑟𝑎𝑛𝑑𝑟𝑦𝑟𝑎𝑛𝑑𝑟𝑧)

(

𝑟𝑎𝑛𝑑𝑡𝑥𝑟𝑎𝑛𝑑𝑡𝑦𝑜𝑝𝑡𝑡𝑧𝑟𝑎𝑛𝑑𝑟𝑥𝑟𝑎𝑛𝑑𝑟𝑦𝑟𝑎𝑛𝑑𝑟𝑧)

(

𝑟𝑎𝑛𝑑𝑡𝑥𝑟𝑎𝑛𝑑𝑡𝑦𝑟𝑎𝑛𝑑𝑡𝑧𝑜𝑝𝑡𝑟𝑥𝑟𝑎𝑛𝑑𝑟𝑦𝑟𝑎𝑛𝑑𝑟𝑧)

(

𝑟𝑎𝑛𝑑𝑡𝑥𝑟𝑎𝑛𝑑𝑡𝑦𝑟𝑎𝑛𝑑𝑡𝑧𝑟𝑎𝑛𝑑𝑟𝑥𝑜𝑝𝑡𝑟𝑦𝑟𝑎𝑛𝑑𝑟𝑧)

(

𝑟𝑎𝑛𝑑𝑡𝑥𝑟𝑎𝑛𝑑𝑡𝑦𝑟𝑎𝑛𝑑𝑡𝑧𝑟𝑎𝑛𝑑𝑟𝑥𝑟𝑎𝑛𝑑𝑟𝑦𝑜𝑝𝑡𝑟𝑧 )

Figure IX-7|General notation of the new input vectors for the minimization algorithm.

Finally, the final set of motion parameters is selected from all 631 calculated parameter sets.

It is checked if the optimization algorithm achieved the maximum number of iteration steps

Figure IX-6| Flow diagram of the minimization procedure.

Page 55: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

54

while calculating this parameter set. In that case, the optimization algorithm is launched once

again, using the optimal set of motion parameters as start position.

Apply Motion Parameters

In the end, the process calculates the transformation matrix, which co-registers the skin

surface and the 3D point cloud, from the final set of motion parameters. This matrix is used to

align the EEG electrodes and MEG sensor positions with the MRI data.

The channel positions are transformed, and the channel file within the Brainstorm database is

updated. Moreover, the chamfer map, which was calculated in the previous steps, is added to

the Brainstorm database before the process stops. Note that the channel file is updated for

the given study while the chamfer map is added to the given subject.

Figure IX-8| Flow diagram of the last optimization steps.

Figure IX-9| Flow diagram of the channel transformation.

Page 56: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

55

X. Material and Methods This section presents an overview of the structure and the code of the implemented process

and the simulation study. The study was used to evaluate the results produced by the process.

For the simulation several MATLAB functions were used. The implemented process is available

for the open-source application Brainstorm, but it uses functions from different MATLAB

toolboxes. A tutorial which describes how the process can be launched from the Brainstorm

interface can be found in the appendix.

Code Structure

A detailed tutorial on the Brainstorm website describes how a process, which will then be run

from the Brainstorm interface, should be implemented. The whole process is saved in a single

*.m-file, which contains different functions and methods. The following subsections give a

brief overview of the general process structure for a brainstorm process. The main idea for the

functions needed for this particular process is outlined in the introduction part. For this reason,

the present section focuses on the implementation for the minimization procedure (see

section II.III).

Brainstorm Process Functions

The first function (or process function) launches a single script which is part of the Brainstorm

software. This script is needed to call the other functions included in the brainstorm process.

function varargout = process_AlignChamferDistance(varargin)

macro_methodcall;

end

Three functions are used to set up the process and define input and output arguments. The

first function GetDescription()returns a structure that describes the process; it defines

the following aspects:

Page 57: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

56

s.Process.Comment process description within the drop-down menu of the

Brainstorm interface

sProcess.Category defines how the process is supposed to behave

sProcess.SubGroup subgroup, which contains the process

sProcess.Index relative position, where the process is placed within the

drop-down menu of the Brainstorm interface

sProcess.InputTypes type of input variables (e.g.: raw, data, results, …)

sProcess.OutputTypes type of output variables (e.g.: raw, data, results, …)

sProcess.nInputs number of input variables

sProcess.nMinFiles minimum number of files included in input variables

%% ===== GET DESCRIPTION =====

function sProcess = GetDescription() %#ok<DEFNU>

sProcess.Comment = 'Co-Registration using chamfer distance';

sProcess.FileTag = '';

sProcess.Category = ’Custom’;

sProcess.SubGroup = 'Import anatomy';

sProcess.Index = 4;

sProcess.InputTypes = {'data'};

sProcess.OutputTypes = {'data'};

sProcess.nInputs = 1;

sProcess.nMinFiles = 1;

end

As input argument, a study file folder from the Brainstorm database can be used. The process

modifies the contained channel file only, while the functional data are not changed. Additional

data, like the anatomical MRI and the head surface, are loaded from the anatomical data which

belong to the study subject. The input data need to contain at least one functional data file.

Page 58: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

57

The second function is used to format the comment, therefore it returns a string which

identifies the process in the Brainstorm interface.

%% ===== FORMAT COMMENT =====

function Comment = FormatComment(sProcess) %#ok<DEFNU>

Comment = sProcess.Comment;

end

The fourth function, which is included in every Brainstorm process, is called in the following

way:

OutputFile = Run(sProcess, sInputs) %#ok<DEFNU>

It executes the process and is, in contrast to the previous functions, not a descriptive one. This

means that it imports the input files and performs the co-registration before it returns the

output to the Brainstorm database. A main part of this function codes the interaction with the

Brainstorm database. Moreover, it includes most of the steps which are crucial for the

minimization procedure (explained in section II.III).

The most important step of this procedure is to create a search grid to start the minimization

algorithm from different starting points. The pre-registration, based on the three anatomical

landmarks, is defined by the initial motion vector:

(

000000)

Figure X-1| Motion vector, which represents the fiducial based co-registration.

Changing one or more of the motion parameters moves the 3D head shape relative to the skin

surface and therefore creates a new starting point. In order to create a couple of starting

Page 59: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

58

positions, nested for-loops are used. In each step one motion parameter is changed. By doing

so, a search grid with 625 grid points is created. The different starting points are rotated

around the z-axis only and not the x- or y-axis.

for tx = [-0.0025 -0.0015 0 0.0015 0.0025]

for ty = [-0.0025 -0.0015 0 0.0015 0.0025]

for tz = [-0.0025 -0.0015 0 0.0015 0.0025]

for rZ = [-0.004 -0.002 0 0.002 0.004]

randStart = [tx ty tz 0 0 rZ];

[o,FVAL,EXITFLAG] = fminsearch(minimize,randStart,options);

end

end

end

end

The minimization algorithm itself is a simplex algorithm, implemented in MATLAB. As a second

step during the optimization procedure, some random starting points are used. These starting

positions consist of one optimized motion parameter and five random values, which move the

head shape up to 0.00125 m in each direction. The whole registration procedure takes place

in the voxel space; for this reason, the head point and EEG electrode coordinates are

transformed to the MRI voxel space. Moreover, the physical space dimensions are changed

from mm to m.

Sub-Functions

The process function includes several sub-functions. These functions are called from the run

function and fulfil different tasks for the process.

Some steps are needed to calculate the chamfer map and add it to the Brainstorm database.

To organize these steps, a function which is called preprocessing_mri is included in the

process. This function uses the full path for the skin surface file, the active anatomical MRI, as

Page 60: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

59

well as the skin surface for the given subject from the Brainstorm database. First of all, the

function checks if a chamfer volume is available within the Brainstorm database. If there is no

chamfer map present for the given subject, other sub-functions are executed: on the one hand,

a function which creates a 3x3x3 mask for the chamfer matrix, and on the other hand, a

function called Chamfer_Map3. It calculates the chamfer distance map with the mask of 3x3x3.

This sub-function returns the required chamfer map. Additional input variables are crucial for

the pre-processing function to save this volume within the Brainstorm database. For this

purpose, the function save_chamfer is used.

There are more sub-functions included in the process. These functions are related to the

optimization process. In order to launch the minimization algorithm, a cost function is needed.

It calculates the cost for a given registration (set of motion parameters). The cost is defined as

the square mean distance between the skin surface and the 3D point cloud. The cost function

is used as input (function handle) for the minimization algorithm.

Before the optimized motion parameters can be applied to the head points and the EEG

electrode or MEG sensor positions, it is necessary to calculate a transformation matrix. This

step is done by the sub-function M_transform. The obtained motion matrix is used as input

parameter for the TransformChannel sub-function. This one changes the Brainstorm channel

file by moving the channel positions and changing the MEG sensor orientation.

Study Design for the Simulation

A sample data set from the Brainstorm website was used for the simulated study. Using a

cluster algorithm, some representative head points were selected from the head surface.

These head points were used as EEG electrode positions instead of recorded coordinates. A

Gauß-function (mean value of 0 and standard derivation of 1) was used in order to add some

noise to the simulated electrode recordings. Moreover, random transformation matrices were

applied to move these points from their original position. The representative points were

translated up to 5 mm along and 10 ° around each space dimension.

Afterwards the registration process was applied to the data, in order to co-register the

simulated EEG electrode positions with the MRI data set. The results were evaluated, by

calculating the Euclidian distance between the co-registered EEG electrode positions and their

Page 61: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

60

original position. As an optimal result for this simulation, the co-registration algorithm would

return the inverse matrix to the random transformation matrix.

The study included a set of 220 representative head points and various amounts of noise (1 %,

5 %, 10 %, 15 %). Furthermore, the registration process was applied to the data for 50 different

random transformations.

Page 62: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

61

XI. Results The following chapter presents the co-registration results. The co-registration, obtained by use

of the implemented process, can be evaluated easily for the simulated study. For this purpose,

the Euclidian distance between the original position of the representative head points and

their position after co-registration is calculated. Furthermore, some study data were co-

registered using the implemented process. In these cases, a visual evaluation of the results is

done, since the perfect position for the recorded head points is unknown.

Simulated Study Data

The design for the simulated study is described in section III.II . In order to compare the results

to those of a well-working co-registration procedure, another implementation, available in

Brainstorm, was used. Both algorithms were applied to the simulated data and afterwards the

obtained results for both co-registration procedures were compared to the original positions

for the representative head points. In order to find out how much the results are influenced

by noisy data, two different values were calculated. On the one hand, the distance between

the co-registered head points and the original position, without noise and transformation, and

on the other hand, the distance between the co-registered head points and the original

position, after the noise had been added to the data, but no transformation had been applied.

In the following, boxplots are used to depict the distances, with regard to the amount of noise.

The following picture depicts the boxplots for the Brainstorm co-registration. It is visible that

a very small co-registration error is achieved for low noise levels. The median Euclidian

distance between the re-aligned head points and their original position is less than 0.5 mm.

Moreover, there is no evidence that the algorithm overfits the head points, since the

distribution of distances between the noisy and the original positions and the re-aligned and

original positions are almost identical. For higher noise levels the algorithm produces less

optimal results. The distances between the noisy head point positions and the re-aligned head

point positions are very similar to those between the original head point positions and the re-

aligned head point positions. Nevertheless, the distance between their noisy and original

positions is much smaller. For this reason, the algorithm does not fit the simulated EEG

electrode positions perfectly to the skin surface.

Page 63: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

62

Figure XI-1| Co-Registration results obtained by the original Brainstorm process. Boxplots for the Euclidean distance [mm] between the original and noisy, the original and re-aligned, and the noisy and re-aligned positions of the head points for different noise levels. The process aligns the simulated EEG electrodes almost perfectly to the head surface if the noise level is very low.

For the new co-registration procedure, the boxplots show similar results as for the Brainstorm

process, albeit the algorithm shows the same behavior for all noise levels. It should be noted

that the Brainstorm process aligns the simulated EEG electrodes almost perfectly to the head

surface if the noise level is very low. In contrast, a median distance of approximately 2 mm is

observed between the re-aligned head points and the original positions, as well as the noisy

head points, after the chamfer based co-registration has been applied to the data.

1 % noise

15 % noise 10 % noise

5 % noise

Page 64: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

63

Figure XI-2| Co-Registration results obtained by the chamfer based Brainstorm process. Boxplots for the Euclidean distance [mm] between the original and noisy, the original and re-aligned, and the noisy and re-aligned positions of the head points for different noise levels. The algorithm shows the same behavior for all noise levels.

Real Study Data

In a second step, the Brainstorm process was applied to some real study data. In doing so, it

was taken into account if the process was influenced by the noise of study data. The results

show that the individual head points were aligned properly to the head surface. However, for

two subjects the recorded points do not fit the skin surface all over the head. The point clouds

seem to be deformed in the occipital (Subject B) or lateral (Subject A) region of the head.

1 % noise

15 % noise 10 % noise

5 % noise

Page 65: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

64

Figure XI-3| Co-registration results obtained with the chamfer based Brainstorm process for Subject A. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-auricular point, LPA: left pre-auricular point). The

recorded points do not fit the skin surface on the right side of the head.

Figure XI-4| Co-registration results obtained with the chamfer based Brainstorm process for Subject B. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-auricular point, LPA: left pre-auricular point). The

recorded points do not fit the skin surface in the occipital region of the head.

Page 66: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

65

Figure XI-5| Co-registration results obtained with the chamfer based Brainstorm process for Subject C. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-auricular point, LPA: left pre-auricular point). The

process aligned the individual head points properly to the head surface.

Figure XI-6| Co-registration results obtained with the chamfer based Brainstorm process for Subject D. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-auricular point, LPA: left pre-auricular point). For the

most part the recorded points fit the skin surface, but the 3D point cloud might be tilted slightly to the left.

Page 67: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

66

XII. Discussion A precise co-registration of functional EEG/MEG data and an anatomical MRI is crucial in order

to construct an individual head model which provides the tissue geometries and conductivities

for source analyses (head modelling). These head models are needed to determine a dipole

position within the subject’s brain with a high spatial resolution.

The presented process can be used to align functional data with MR recordings of a given

subject. The simulated study showed that the process produces reasonable results, although

they were not as good as those achieved by the standard implementation in Brainstorm.

Nevertheless, it is obvious that the results became more similar as the noise level of the

simulated head points increased. For this reason, it might be investigated if the co-registration

based on the chamfer distance map is more stable for noisy data than the Brainstorm process.

It should be taken into account that the simulated EEG electrode positions described a more

or less hemispherical shape. Therefore, it is possible that the simulated head shape is shifted

around the z-axis, since no prominent anatomical markers are included in the simulated head

shape. For this reason, the analysis of the real study data was an important point. It is visible

that the head points, which include the region around the nose and the eyes, are important in

achieving reasonable results. Julie Verreault [Verreault2012] reported that those regions were

not co-registered properly to the skin surface. This error was fixed, after the Powell algorithm

had been replaced by a simplex algorithm for the minimization procedure. But the co-

registration of the skin surface and the recorded head points is influenced by deformations of

the 3D point cloud. This is visible in figures 12 and 13. It is obvious that the recorded point

clouds for Subject A and B are deformed in some regions. Those deformations might be caused

by movements of the reference or during the recording process, for example, if the stylus,

which is used by the operator to record the points, does not touch the subject’s skin during

the recording procedure.

Page 68: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

67

XIII. Conclusion and Outlook Up to this point, the implemented process generates reasonable results for real study data. It

might be used as an alternative procedure, if the original Brainstorm co-registration algorithm

does no achieve the desired results. Nevertheless, there are some steps which are crucial in

order to improve the chamfer based co-registration process. Basically, four aspects which

might need to be improved were found during the process evaluation. Three of them are

related to the minimization procedure and the cost function calculation.

The search grid or, more precisely, the number and distribution of the starting points for the

minimization algorithm could be improved. With respect to the mean error of the recorded

head points and expected head movements or point cloud deformations, an advanced search

grid should be defined. For the given search grid, the starting points were rotated around the

z-axis only. Since the anatomical markers are defined within the z pane, it was expected that

the point cloud is mostly rotated around this axis, while the other ones are fixed. This

assumption should be reviewed, before a new search grid is defined. Moreover, it might be

useful to refine grid resolution (start with coarse grid and refine it around the best starting

point), instead of using random starting points for the second minimization step.

Another approach might be to modify the cost function. For now, the square mean distance is

minimized, to achieve the best co-registration. This has been reported as a stable and fast

method [Schwartz1996]. However, other cost functions might be evaluated as well, since

Schwartz et al. used the Powell algorithm instead of the simplex algorithm. Furthermore, the

function GetCostPO(), which is used to calculate the cost value, approximates head radius

with 0.07 m. The head radius is needed to transform the rotation parameter from mm to angle

size. Therefore, a wrong value might cause an inaccurate rotation parameter and erroneous

co-registration result.

On a final note, the results for the real study data showed that a correct co-registration is

barely possible if the recorded head shape is deformed. For this reason, an additional module

or function could be included in the process, to smooth the head shape and remove some

noise from the recorded point cloud.

Page 69: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

68

XIV. Appendix II

List of references

[Borgefors1986] Borgefors, G. Distance Transformations in Digital Images.

Computer Vision, Graphics and Image Processing, 1986, 34:344-371

[Schwartz1996] Schwartz, D.; Lemoine, D.; Poiseau, E. and Barillot C.,

Registration of MEG/EEG data with 3D MRI: Methodology and precision issues, Brain

Topography, Vol. 9, No. 2, 1996.

[Tadel2011] Tadel F, Baillet S, Mosher JC, Pantazis D, Leahy RM, “Brainstorm:

A User-Friendly Application for MEG/EEG Analysis,” Computational Intelligence and

Neuroscience, vol. 2011, Article ID 879716, 13 pages, 2011. DOI:10.1155/2011/879716

[Verreault2012] Verreault, J. Conception et intégration du module de recalage

dans Brainstorm. École de technologie supérieure, 2012.

List of Figures

Figure IX-1|Flow diagram of data importation. All data are imported for the Brainstorm

database. ................................................................................................................................... 50

Figure IX-2|Flow diagram of chamfer map computation. The chamfer map is not calculated, if

one is available within the Brainstorm database. ..................................................................... 51

Figure IX-3| Three-dimension chamfer mask of length 3. ........................................................ 51

Figure IX-4| General notation of the input and output vectors for the minimization algorithm.

................................................................................................................................................... 52

Figure IX-5| Sample set of input vectors. The starting point is translated along the x-axis.

Dimensions are in [m]. ............................................................................................................... 52

Figure IX-6| Flow diagram of the minimization procedure. ...................................................... 53

Figure IX-7|General notation of the new input vectors for the minimization algorithm. ........ 53

Figure IX-8| Flow diagram of the last optimization steps. ........................................................ 54

Figure IX-9| Flow diagram of the channel transformation. ...................................................... 54

Figure X-1| Motion vector, which represents the fiducial based co-registration..................... 57

Page 70: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

69

Figure XI-1| Co-Registration results obtained by the original Brainstorm process. Boxplots for

the Euclidean distance [mm] between the original and noisy, the original and re-aligned, and

the noisy and re-aligned positions of the head points for different noise levels. The process

aligns the simulated EEG electrodes almost perfectly to the head surface if the noise level is

very low. .................................................................................................................................... 62

Figure XI-2| Co-Registration results obtained by the chamfer based Brainstorm process.

Boxplots for the Euclidean distance [mm] between the original and noisy, the original and re-

aligned, and the noisy and re-aligned positions of the head points for different noise levels.

The algorithm shows the same behavior for all noise levels. ................................................... 63

Figure XI-3| Co-registration results obtained with the chamfer based Brainstorm process for

Subject A. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-

auricular point, LPA: left pre-auricular point). The recorded points do not fit the skin surface

on the right side of the head. .................................................................................................... 64

Figure XI-4| Co-registration results obtained with the chamfer based Brainstorm process for

Subject B. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-

auricular point, LPA: left pre-auricular point). The recorded points do not fit the skin surface

in the occipital region of the head. ........................................................................................... 64

Figure XI-5| Co-registration results obtained with the chamfer based Brainstorm process for

Subject C. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-

auricular point, LPA: left pre-auricular point). The process aligned the individual head points

properly to the head surface. .................................................................................................... 65

Figure XI-6| Co-registration results obtained with the chamfer based Brainstorm process for

Subject D. The anatomical landmarks are labellled in the images (NAS: nasion, RPA: right pre-

auricular point, LPA: left pre-auricular point). For the most part the recorded points fit the

skin surface, but the 3D point cloud might be tilted slightly to the left. .................................. 65

Page 71: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

70

Tutorial: Process AlignChamferDistance Sometimes the sensors (electrodes, magnetometers or gradiometers) cannot be aligned properly with the MRI and the surfaces of the subject if the standard co-registration procedure is used.

In this tutorial, we will align the sensors on the subject's head, using the chamfer distance. For this purpose, it is crucial to run a process. This tutorial explains how to select the necessary files and run the process.

Auditory dataset The dataset used in this tutorial is the same as the one used in the introduction tutorials and in the MEG Auditory tutorial.

License This tutorial dataset (MEG and MRI data) remains a property of the MEG Lab, McConnell Brain Imaging Center, Montreal Neurological Institute, McGill University, Canada. Its use and transfer outside the Brainstorm tutorial, e.g. for research purposes, is prohibited without written consent from the MEG Lab.

If you reference this dataset in your publications, please acknowledge its authors (Elizabeth Bock, Peter Donhauser, Francois Tadel and Sylvain Baillet) and cite Brainstorm as indicated on the website. For questions, please contact us through the forum.

Place process function in your user folder The Brainstorm plug-in, or "process" is automatically identified and added to the menus in the pipeline editor, after you placed it in your user folder:

• $HOME/.brainstorm/process

Select files to process For this tutorial we have not used the automatic head shape registration which is executed when you choose the option "Refine registration with head points". Instead we will use the chamfer distance to improve the registration between the MRI and the MEG/EEG sensors. The right picture represents the initial NAS/LPA/RPA registration.

Drag the functional data you want to realign to the subject's MRI in Process1. Make sure that your data contain channel positions or a head shape file, an individual MRI and segmented head surface for the given subject.

Page 72: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

71

Select process

• Click on the [Run] button at the bottom-left corner of the Process1 tab.

• The Pipeline editor window appears. Select “ Import anatomy > Co-Registration using chamfer

distance “ When you have selected the process, the process starts by calculating the chamfer distance matrix.

Page 73: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

72

Validation

In the end, the chamfer matrix (note that you might need to adjust the amplitude and the transparency in the surface data options) as well as the registration results are depicted, and the new channel file will be saved in the Brainstorm database. Moreover, the chamfer distance map and the calculated skin surface will be added to the Brainstorm database for the subject.

Final registration

The following pictures represent the initial NAS/LPA/RPA registration (top), and the registration based on the chamfer distance (bottom).

Page 74: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

                                                                     

 

July 11th, 2016

Authorization for Marie Theiss to include her internship report in her MSc. Thesis

Prof. Dr. Heinrich Brinck August-Schmidt-Ring 10 45665 Recklinghausen Dear Prof. Dr. Brinck,

With this letter, I authorize Marie Theiss, who did an internship in my laboratory, to include her work and report done during this internship as part of her Master Thesis. Marie arrived in my laboratory, the multimodal functional imaging lab (located both in Physics dpt at Concordia University and in Biomedical Engineering dpt at McGill University, Montreal, Canada) for a period of 3 months from April to June 2016. The project of her internship in my lab was entitled “Implementation of a Brainstorm Process for Chamfer Distance based MEG - MRI Co-Registration”. Her project consisting in adapting to Brainstorm software (a widely recognized software dedicated for Electro-EncephaloGraphy EEG and Magneto-EncphaloGraphy MEG data analysis and source localization), a MEG-MRI automatic co-registration method, based on the study proposed originally published by Schwartz et al 1996, and re-implemented in my lab. The method basically consists in transforming an anatomical MRI of the head into a volumetric distance map from the skin surface (using the so-called Chamfer distance transform method), in order to automatically co-registration a cloud of point digitized from the head of the subject (headshape) to his anatomical MRI. Reaching accurate MEG-MRI co-registration is absolutely crucial to ensure sufficient accuracy of source localization techniques aiming at converting scalp EEG-MEG measurements into current density maps along the cortical surface. Marie did an excellent work and I authorize her to include this report as pert of her Master thesis.

Feel free to contact me directly in case you would like any further information,

Sincerely,

Christophe Grova Ph.D Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Chair of PERFORM Applied BioImaging Committee, Concordia University Adjunct Prof in Biomedical Eng., and Neurology and Neurosurgery Dpt, McGill Univ. Director of the Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Email : [email protected] Phone : (514) 848-2424 ext 4221

Page 75: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

                                                                     

 

 

July 11th, 2016

Reference Letter for Marie Theiss

To whom it may concern,

I am pleased to write this letter to recommend fully the work of Marie Theiss, especially in the context of her finishing her Master of Science and applying for PhD positions. Marie contacted during the year of 2015 in order to come to my lab. for a summer internship, while she was finishing a Master of Science in Molecular Biology from Westphalian University of Applied Science (Recklinghausen, Germany). She arrived in my laboratory, the multimodal functional imaging lab (located both in Physics dpt at Concordia University and in Biomedical Engineering dpt at McGill University, Montreal, Canada) for a period of 3 months from April to June 2016. The project of her internship in my lab was entitled “Implementation of a Brainstorm Process for Chamfer Distance based MEG - MRI Co-Registration”. Her project consisting in adapting to Brainstorm software (a widely recognized software dedicated for Electro-EncephaloGraphy EEG and Magneto-EncphaloGraphy MEG data analysis and source localization), a MEG-MRI automatic co-registration method, based on the study proposed originally published by Schwartz et al 1996, and re-implemented in my lab. The method basically consists in transforming an anatomical MRI of the head into a volumetric distance map from the skin surface (using the so-called Chamfer distance transform method), in order to automatically co-registration a cloud of point digitized from the head of the subject (headshape) to his anatomical MRI. Reaching accurate MEG-MRI co-registration is absolutely crucial to ensure sufficient accuracy of source localization techniques aiming at converting scalp EEG-MEG measurements into current density maps along the cortical surface.

I have been very pleased and impressed by the work Marie completed in such a short period of time (3 months). She has been able to fully understand and follow the code written by someone else, to adapt and re-implement it within the framework of Brainstorm software, by following the guidelines provided by the main developer in charge of Brainstorm project, François Tadel. She also significantly optimized and improved the overall procedure (from a duration of around 20min to 2-3min). Finally at the end of her internship, she provided some preliminary evaluation of the method on simulated data and real data. During her internship, I had several occasions to evaluate that Marie had indeed excellent knowledge of the research field she is working on. She also demonstrated excellent productivity, some independence and was also able to take some interesting initiatives. I asked Marie to give two oral presentations of her work, one in the context of a lab meeting and one with François Tadel and finally she wrote a small report of

Page 76: Impact of Different Registration Methods on MEG Source - Analysiswolters/PaperWolters/2016/Theiss... · 2016. 7. 21. · FACHBEREICH ELEKTROTECHNIK UND ANGEWANDTE NATURWISSENSCHAFTEN

                                                                     

 

the work she did during these 3 months internship in my lab. So I can also certify that she has excellent writing and speaking skills in English. She is overall a brilliant, motivated and very nice person to work with, who well integrated herself within the team and was able to show significant productivity for the short period of time she has been with us.

In conclusion, I am confident that Marie Theiss has all the required expertise and capacity to continue in a very productive PhD program and I therefore fully recommend any of her application. Feel free to contact me directly in case you would like any further information,

Sincerely,

Christophe Grova Ph.D Assistant Professor, Physics Dpt, Concordia University PERFORM centre, Chair of PERFORM Applied BioImaging Committee, Concordia University Adjunct Prof in Biomedical Eng., and Neurology and Neurosurgery Dpt, McGill Univ. Director of the Multimodal Functional Imaging Lab (Multi FunkIm) Montreal Neurological Institute - epilepsy group Email : [email protected] Phone : (514) 848-2424 ext 4221