Magnetic Resonance Brain Imaging: Modelling and Data Analysis Using R (Use R!) [2 ed.] 3031389484, 9783031389481

This book discusses modelling and analysis of Magnetic Resonance Imaging (MRI) data of the human brain. For the data pro

148 102 41MB

English Pages 279 [268] Year 2023

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Magnetic Resonance Brain Imaging: Modelling and Data Analysis Using R (Use R!) [2 ed.]
 3031389484, 9783031389481

Table of contents :
Preface to the Second Edition
Preface to First Edition
Contents
Acronyms
1 Introduction
2 Magnetic Resonance Imaging in a Nutshell
2.1 The Principles of Magnetic Resonance Imaging
2.1.1 The Zeeman effect for Atomic Nuclei
2.1.2 Macroscopic Magnetization Vector
2.1.3 Spin Excitation and Relaxation
2.1.4 Spatial Localization and Pulse Sequences
2.1.5 MR Image Formation and Parallel Imaging
2.2 Special MR Imaging Modalities
2.2.1 Functional Magnetic Resonance Imaging (fMRI)
2.2.2 Diffusion Weighted Magnetic Resonance Imaging(dMRI)
2.2.3 Multi-parameter Mapping (MPM)
2.2.4 Inversion Recovery Magnetic Resonance Imaging (IR-MRI)
3 Medical Imaging Data Formats
3.1 DICOM Format
3.2 ANALYZE and NIfTI format
3.3 The BIDS Standard for Neuroimaging Data
4 Functional Magnetic Resonance Imaging
4.1 Prerequisites for Running the Code in This Chapter
4.2 Pre-processing fMRI Data
4.2.1 Example Data
Functional MRI Data on Visual Object Recognition (ds000105)
Multi-subject and Multi-modal Neuroimaging Dataset on Face Processing (ds000117)
Multi-modal Longitudinal Study of a Single Subject (ds000031)
4.2.2 Slice Time Correction
4.2.3 Motion Correction
4.2.4 Registration
4.2.5 Normalization
4.2.6 Brain Mask
4.2.7 Brain Tissue Segmentation
4.2.8 Using Brain Atlas Information
4.2.9 Spatial Smoothing
4.3 The General Linear Model (GLM) for fMRI
4.3.1 Modeling the BOLD Signal
4.3.2 The Linear Model
4.3.3 Simulated fMRI Data
4.4 Signal Detection in Single-Subject Experiments
4.4.1 Voxelwise Signal Detection and the Multiple Comparison Problem
4.4.2 Bonferroni Correction
4.4.3 Random Field Theory
4.4.4 False Discovery Rate (FDR)
4.4.5 Cluster Thresholds
4.4.6 Permutation Tests
4.5 Adaptive Smoothing in fMRI
4.5.1 Analyzing fMRI Experiments with Structural Adaptive Smoothing Procedures
4.5.2 Structural Adaptive Segmentation in fMRI
4.6 Other Approaches for fMRI Analysis Using R
4.6.1 Multivariate fMRI Analysis
4.6.2 Independent Component Analysis (ICA)
4.7 Functional Connectivity for Resting-State fMRI
5 Diffusion-Weighted Imaging
5.1 Prerequisites
5.2 Diffusion-Weighted MRI Data
5.2.1 The Diffusion Equation and MRI
5.2.2 Example Data
5.2.3 Data Pre-processing
5.2.4 Reading Pre-processed Data
5.2.5 Basic Data Properties
5.2.6 Definition of a Brain Mask
5.2.7 Characterization of Noise in Diffusion-Weighted MRI
5.3 Modeling Diffusion-Weighted MRI Data
5.3.1 The Apparent Diffusion Coefficient (ADC)
5.3.2 Diffusion Tensor Imaging (DTI)
5.3.3 Diffusion Kurtosis Imaging (DKI)
5.3.4 The Orientation Distribution Function
5.3.5 Tensor Mixture Models
5.4 Smoothing Diffusion-Weighted Data
5.4.1 Effects of Gaussian Filtering
5.4.2 Multi-shell Position-Orientation Adaptive Smoothing (msPOAS)
5.5 Fiber Tracking Methods
5.6 Structural Connectivity
6 Multiparameter Mapping
6.1 Prerequisites
6.2 Multiparameter Mapping
6.2.1 Signal Model in FLASH Sequences
6.2.2 Data from the Multiparameter Mapping (MPM) Protocol
6.2.3 Reparameterization of the Signal Model by ESTATICS
6.2.4 Correction for Instrumental B1-Bias
6.2.5 Correction for the Bias Induced by Low SNR
6.2.6 Structural Adaptive Smoothing of Relaxometry Data
7 Inversion Recovery Magnetic Resonance Imaging
7.1 Prerequisites
7.2 Tissue Porosity Estimation by Inversion Recovery MRI–based Experiments
7.3 Generating a Simulated Dataset
7.4 Estimation of Parameters from IR MRI Data in a Mixture Model
A Smoothing Techniques for Imaging Problems
A.1 Non-parametric Regression
A.1.1 Kernel Smoothing
A.2 Adaptive Weigths Smoothing
A.2.1 Local Constant Likelihood Models
A.2.2 Patch-Wise Adaptive Weights Smoothing (PAWS)
A.3 Special Settings in Neuroimaging Experiments
A.3.1 Simultaneous Mean and Variance Estimation
A.3.2 Vector Valued Data
A.3.3 Diffusion Data
A.3.4 Tensor-Valued Data
A.3.5 Model-Driven Smoothing of Observed Images
B Resources for Neuroimaging in R
B.1 An Overview on Selected R Packages for Neuroimaging
B.2 Open Neuroimaging Data Archives
C Data, Software and Hardware Resources
C.1 How to Get the Example Code
C.2 Packages and Software to Install
C.3 How to Acquire and Organize the Example Data
C.3.1 Data from the `Kirby21' Reproducibility Study
C.3.2 Data from OpenNeuro
C.3.3 DICOM Example Data
C.3.4 MPM Data Example
C.3.5 Atlas Data
C.4 How to Obtain Precomputed Results
C.5 System Requirements
References
Index

Citation preview

UseR !

Jörg Polzehl Karsten Tabelow

Magnetic Resonance Brain Imaging Modelling and Data Analysis Using R Second Edition

Use R! Series Editors Robert Gentleman, 23andMe Inc., South San Francisco, USA Kurt Hornik, Department of Finance, Accounting and Statistics, WU Wirtschaftsuniversität Wien, Vienna, Austria Giovanni Parmigiani, Dana-Farber Cancer Institute, Boston, USA

This series of inexpensive and focused books on R is aimed at practitioners. Books can discuss the use of R in a particular subject area (e.g., epidemiology, econometrics, psychometrics) or as it relates to statistical topics (e.g., missing data, longitudinal data). In most cases, books combine LaTeX and R so that the code for figures and tables can be put on a website. Authors should assume a background as supplied by Dalgaard’s Introductory Statistics with R or other introductory books so that each book does not repeat basic material. How to Submit Your Proposal Book proposals and manuscripts should be submitted to one of the publishing editors in your region per email – for the list of statistics editors by their location please see https://www.springer.com/gp/statistics/contact-us. All submissions should include a completed Book Proposal Form. *** For general and technical questions regarding the series and the submission process please contact Faith Su ([email protected]) or Veronika Rosteck ([email protected]).

Jörg Polzehl • Karsten Tabelow

Magnetic Resonance Brain Imaging Modelling and Data Analysis Using R Second Edition

Jörg Polzehl Berlin, Germany

Karsten Tabelow WIAS Berlin Berlin, Germany

ISSN 2197-5736 ISSN 2197-5744 (electronic) Use R! ISBN 978-3-031-38948-1 ISBN 978-3-031-38949-8 (eBook) https://doi.org/10.1007/978-3-031-38949-8 © The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Switzerland AG 2019, 2023 This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland Paper in this product is recyclable.

Für Louis Pascal, Maurice und Jean-Loup Frederic—K.T. To my friends and family—J.P.

Preface to the Second Edition

Since the publishing of the First Edition of this book, development of new methods and software in R for magnetic resonance brain imaging has been continuing. In particular, efforts to achieve reproducibility have been multiplied in order to tackle the reproducibility crisis and to progress towards FAIR data and software. For this Second Edition of the book, we went through all examples making sure they would run with current versions of the software. Part of the data from the openNeuro repository used in the book has been reorganized. We thank Russ Poldrack for making the revised data available in time for this edition. We reorganized the R code of the examples in a more readable and structured form and to adjust for changes in the data archives and R packages used. We created a dataset for persistent download to make all code snippets easily accessible. Furthermore, some intermediate results are computationally very expensive to calculate, so we also make those available in the respective dataset. Given the neuroimaging data from publicly available repositories, this should enable to run all examples in a couple of minutes, when the actual function call might use hours or even more. We added recent references to the literature related to the topics of this volume and wrote a new chapter on another quantitative imaging method based on inversion-recovery MRI, which we show can be useful to estimate tissue properties like its porosity. We hope that this Second Edition provides useful references to data, code, and methods for those readers who want to perform magnetic resonance brain imaging analysis with R. Part of books revision was done during stays of the first author at the School of Statistics, University of Minnesota. I highly appreciated the hospitality received during these stays. Berlin, Germany March 2023

Jörg Polzehl Karsten Tabelow

vii

Preface to First Edition

Our interest in neuroimaging started some 20 years ago, initiated by talks given by Fred Godtliebsen (UiT, Tromsø, Norway) and by Fridhjof Kruggel (Max-PlanckInstitute of Cognitive Neuroscience, Leipzig) on functional Magnetic Resonance Imaging in the colloquium of the Weierstrass Institute for Applied Analysis and Stochastics (WIAS). At that time Vladimir Spokoiny and one of the authors of this book, Jörg Polzehl, were interested in imaging problems starting from pure theoretic developments in nonparametric statistics, particularly in adaptive smoothing for regression problems. This has led to interesting algorithms for image denoising that rely on qualitative assumptions on the image structure, adapt to this structure and preserve essential spatial information (Polzehl and Spokoiny 2000). fMRI seemed to be a perfect application for the methodology. It resulted in a paper, Polzehl and Spokoiny (2001), and a successful grant proposal within the DFG Research Center MATHEON. This approach was presented as a poster at the Organization of Human Brain Mapping (OHBM) Meeting at San Antonio in 2000, which lead to a first contact with a group of statisticians working on neuroimaging problems and resulted in an invitation by Keith Worsley to participate in a statistics in neuroimaging workshop in Montreal in December 2000. In 2005 the other author of his book, Karsten Tabelow, joint the project. We met Henning U. Voss from Weill Cornell Medical College, New York, USA. This collaboration was very important, as Henning is a physicist and acquires MRI data himself with clinical questions in the background. We always felt that the combination of mathematical development along a specific scientific question is key to the success of the project. The first paper of this collaboration, (Tabelow et al. 2006), was a complete elaboration of a structural adaptive smoothing procedure for fMRI but it also included the statistical inference on the fMRI activation areas.1 It was important to show the usefulness of such an approach in clinical context (Tabelow et al. 2008b), specifically for better alignment of activation regions in pre-surgical planning.

1 as

Keith Worsley nicely stated in one of his reviews on the accompanying R package fmri ix

x

Preface to First Edition

Henning U. Voss also introduced us to diffusion Magnetic Resonance Imaging and diffusion models, e.g., the diffusion tensor model, but also to the orientation distribution function. Thus, we started to develop a structural adaptive smoothing method for dMRI data in the context of the tensor model (Tabelow et al. 2008a). Presenting the results at the Annual Meeting of the OHBM 2007 we met Michael Deppe (University Hospital, Münster, Germany), Siawoosh Mohammadi and Alfred Anwander (Max-Planck-Institute of Cognitive Neuroscience, Leipzig), which stimulated our interest in dMRI analysis. The first author got the chance to participate in the 2nd International Summer School in Biomedical Engineering on DiffusionWeighted Magnetic Resonance Imaging: Principles and Applications in 2007. Together with our PhD student Saskia Becker we developed the model-free structural adaptive smoothing method for dMRI data, which we called (multishell) position-orientation adaptive smoothing (msPOAS, Becker et al. 2012, 2014). Motivation for these approaches stems from a collaboration with Remco Duits (TU Eindhoven, Netherlands). At the same time we also contributed to the modeling of diffusion data by providing a tensor mixture model with automatic selection of the number of tensor components (Tabelow et al. 2012). Meanwhile, Siawoosh Mohammadi moved to the Wellcome Trust Centre for Neuroimaging at UCL. There, we started discussions on another imaging modality based on Multi-Parameter Mapping with Nikolaus Weiskopf and Martina F. Callaghan. One of the results of this collaboration is the structural adaptive smoothing method for MPM data (Mohammadi et al. 2017). Accompanying with the methodological development we always implemented the algorithms in packages for R, specifically aws, fmri, dti, and qMRI and released them on CRAN under a GNU license. However, much more people worked on methods for neuroimaging using R. Around 2011, we felt, together with Brandon Whitcher, that time was ripe to summarize those activities in a special volume of the Journal of Statistical Software on “Magnetic Resonance Imaging in R”, see also Tabelow et al. (2011). At CRAN the “Medical Imaging Task View” was created by Brandon Whitcher. We used some of the material that finally went into this book for a lecture course on Statistics in Neuroimaging at the Humboldt-University Berlin in winter 2010. The plan to write this book dates back to this time. With a workshop on Neuroimaging Data Analysis in 2013 and the Program on Challenges in Computational Neuroscience (CCNS)2 at SAMSI in 2015–16, both initiated by Hongtu Zhu (University of Chapel Hill, US), the statistics and neuroscience communities tried to further link both disciplines and encourage young statisticians to work on emerging problems at this interface of disciplines.

2 Supported by the National Science Foundation under Grant DMS-1127914 to the Statistical and Applied Mathematical Sciences Institute.

Preface to First Edition

xi

In 2017 the Neuroconductor project3 (Muschelli et al. 2019) went online collecting and adding many R packages related to neuroimaging and providing an easy-to-use access to them. This really enhanced the usage of R in neuroimaging, e.g., because John Muschelli contributed a huge number of missing implementations as packages. This allowed us to present complete analysis pipelines solely based on R packages in all chapters of this book. We have to thank a lot of people, not only those mentioned above. Without the collaboration and support our results and the writing of this book would not have been possible. The Weierstrass Institute for Applied Analysis and Stochastics (WIAS Berlin) provided the perfect environment. We want to specifically thank Jürgen Sprekels for his support of the whole imaging project at WIAS. We are thankful to many colleagues from neuroscience we closely collaborate with, especially André Brechmann and Reinhard König (LIN, Magdeburg), John-Dylan Haynes (Einstein Zentrum Berlin, Charité Berlin), with whom we organized a workshop on “Statistics and Neuroimaging” in 2011, and Christophe Lenglet (CMRR, University of Minnesota, US). They introduced us into real world problems, explained the physics and neuroscientific background behind, and provided us with extensive data or even performed specific experiments to validate our modeling approaches. This book is about processing and modeling of images (in a general sense) from Magnetic Resonance Imaging. For their implementation we rely on R (R Development Core Team 2022), the software environment for statistical computing and graphics. With this book, we want to bridge two often distinct communities. It is intended for statisticians, who are interested in neuroimaging and look for an introduction. On the other hand, we hope it will be suited for neuroimaging students, who want to learn about the statistical modeling and analysis of MRI data. By providing full worked-out examples the book shall serve as a tutorial for MRI analysis with R. We would very much like to see further development in the field, as R is already capable of providing most of MRI analysis. In this book we cover the theory underlying the modeling and data analysis or data description when we think it is necessary. For all imaging modalities we outline complete analysis pipelines and illustrate them by worked-out examples. Still, the field of neuroimaging is huge, so the book remains incomplete. For example, we do not cover group fMRI analysis, but the second-level analysis can be performed using existing R functionality. We do not address clinical diagnostics based on multimodal structural MRI, see, e.g., Crainiceanu et al. (2016). Furthermore, we also dropped the use of machine learning techniques in multi-variate pattern analysis, which still would require some implementation in R to become a feasible analysis tool. We also leave out important diffusion models like NODDI or g-ratio maps for the lack of implementations in R. We are, however, convinced that R provides a rich environment for further developments.

3 Neuroconductor and its maintainers have been partially supported by the R01 grant NS060910 from the National Institute of Neurological Disorders and Stroke at the National Institutes of Health (NINDS/NIH).

xii

Preface to First Edition

Somewhat parallel to the development and success of the imaging technologies in neurosciences, the reproducibility crisis in science reached the field with the general question on how many of the results are false. In fact, most are (Ioannidis 2005). The dispute raised important issues on the handling of the ever-growing amount of data, i.e., its organizations, description, and publication, as well as the reporting of the methods that have been used for the analysis of the data and lead to the scientific findings. It also met the discussion on the way of the publication of scientific data, analysis, and results promoting Open Access publication, Open Data, and more general Open Science. Specifically, data sharing repositories like OpenNeuro (Stanford Center for Reproducible Neuroscience 2019; Poldrack and Gorgolewski 2017) or repositories providing access for scientific purposes, see Turner et al. (2016, 2017) and also Appendix B, emerged. With the advance of new standards for data organization like the Brain Imaging Data Structure (BIDS) (Gorgolewski et al. 2016) for the organization of MRI data in NIfTI format, such repositories become an easy-to-use source for neuroimaging data to acquire new and initially unintended scientific results or, like the authors of this book, to develop new methodology. They also, together with a complete description of the corresponding metadata and preferably the analysis software, enable the reproduction of published results by other scientist than the original authors. Furthermore, for the neuroimaging community appropriate recommendations for reporting the path to the scientific results are developed, e.g., by the Committee on Best Practices in Data Analysis and Sharing (COBIDAS) of the Organization for Human Brain Mapping (OHBM) (Nichols et al. 2017). Within R a workflow is available that naturally supports the creation of scientific reports, e.g., based on LATEX, that are directly linked to the data and the code to produce the results. Originally, the approach was to use R function Sweave (Leisch 2002a,b), which by calling R Sweave on a LATEXdocument that includes R code executes the latter and includes the resulting numbers, statistics, or even figures together with the commands that create them within the document. Later, the knitr package (Xie 2022) was developed to solve some long-standing problems in Sweave and to serve as a transparent engine for dynamic report generation with R (Xie 2015). In principle, such a dynamic report is created from a LATEXdocument that includes so-called chunks of code in a *.Rnw file. R with the knitr package then creates the actual *.tex that contains highlighted code and the results of its execution. The system is flexible enough to work with other programming languages, like Python, Julia or awk, and produce any output markup, like LATEX, HTML, or Markdown. In an attempt for full reproducibility this book completely relies on such a dynamic report generation: It uses neuroimaging data publicly available on repositories, the PDF was created running the R code in the included chunks and then run LATEXon the *.tex markup code. Thus, almost all figures, numbers, and results are generated while producing the PDF from the sources. The only exception we made to this principle was due to the fact, that some neuroimage analysis runs for many hours or even days. The most extreme example is the call to xfibres for the ball-and-sticks model in Sect. 5.3.5 which required almost two weeks of

Preface to First Edition

xiii

computation. In such cases, we saved the results in objects and re-loaded it within the document for further processing. Apart from that the book can be created from the data completely on the fly. With this book we hope to make colleagues aware that already at its current stage R offers substantial tools for modeling in neuroscience and that what is available can be used as part of a more comprehensive analysis pipeline. We also hope to further encourage the statistics community to work on the many open problems neuroimaging currently offers and the neuroimaging community to consider using R as programming environment for their analysis. Berlin, Germany March 2019

Jörg Polzehl Karsten Tabelow

Contents

1

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

2

Magnetic Resonance Imaging in a Nutshell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 The Principles of Magnetic Resonance Imaging . . . . . . . . . . . . . . . . . . . . . . 2.1.1 The Zeeman effect for Atomic Nuclei . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 Macroscopic Magnetization Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.3 Spin Excitation and Relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.4 Spatial Localization and Pulse Sequences. . . . . . . . . . . . . . . . . . . . 2.1.5 MR Image Formation and Parallel Imaging . . . . . . . . . . . . . . . . . 2.2 Special MR Imaging Modalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Functional Magnetic Resonance Imaging (fMRI) . . . . . . . . . . . 2.2.2 Diffusion Weighted Magnetic Resonance Imaging (dMRI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Multi-parameter Mapping (MPM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Inversion Recovery Magnetic Resonance Imaging (IR-MRI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5 5 5 7 7 9 10 11 11

3

Medical Imaging Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 DICOM Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 ANALYZE and NIfTI format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 The BIDS Standard for Neuroimaging Data . . . . . . . . . . . . . . . . . . . . . . . . . .

17 17 21 25

4

Functional Magnetic Resonance Imaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Prerequisites for Running the Code in This Chapter. . . . . . . . . . . . . . . . . . 4.2 Pre-processing fMRI Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.1 Example Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.2 Slice Time Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.3 Motion Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.4 Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.5 Normalization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.6 Brain Mask. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.7 Brain Tissue Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29 29 30 30 31 32 35 35 37 38

12 14 15

xv

xvi

Contents

4.2.8 Using Brain Atlas Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2.9 Spatial Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The General Linear Model (GLM) for fMRI . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Modeling the BOLD Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 The Linear Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.3 Simulated fMRI Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signal Detection in Single-Subject Experiments . . . . . . . . . . . . . . . . . . . . . 4.4.1 Voxelwise Signal Detection and the Multiple Comparison Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2 Bonferroni Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.3 Random Field Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.4 False Discovery Rate (FDR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.5 Cluster Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.6 Permutation Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adaptive Smoothing in fMRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.1 Analyzing fMRI Experiments with Structural Adaptive Smoothing Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.5.2 Structural Adaptive Segmentation in fMRI . . . . . . . . . . . . . . . . . . Other Approaches for fMRI Analysis Using R . . . . . . . . . . . . . . . . . . . . . . . 4.6.1 Multivariate fMRI Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6.2 Independent Component Analysis (ICA). . . . . . . . . . . . . . . . . . . . . Functional Connectivity for Resting-State fMRI . . . . . . . . . . . . . . . . . . . . .

39 41 42 42 45 50 52

Diffusion-Weighted Imaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Diffusion-Weighted MRI Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 The Diffusion Equation and MRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Example Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.3 Data Pre-processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.4 Reading Pre-processed Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.5 Basic Data Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.6 Definition of a Brain Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.7 Characterization of Noise in Diffusion-Weighted MRI . . . . . . 5.3 Modeling Diffusion-Weighted MRI Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.1 The Apparent Diffusion Coefficient (ADC) . . . . . . . . . . . . . . . . . . 5.3.2 Diffusion Tensor Imaging (DTI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.3 Diffusion Kurtosis Imaging (DKI). . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3.4 The Orientation Distribution Function . . . . . . . . . . . . . . . . . . . . . . . 5.3.5 Tensor Mixture Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4 Smoothing Diffusion-Weighted Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.1 Effects of Gaussian Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.4.2 Multi-shell Position-Orientation Adaptive Smoothing (msPOAS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.5 Fiber Tracking Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.6 Structural Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85 85 85 86 89 89 96 99 102 104 111 112 113 122 125 133 140 141

4.3

4.4

4.5

4.6

4.7 5

53 55 56 58 60 62 62 64 68 70 70 73 77

142 145 149

Contents

xvii

6

Multiparameter Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Multiparameter Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Signal Model in FLASH Sequences . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Data from the Multiparameter Mapping (MPM) Protocol. . . 6.2.3 Reparameterization of the Signal Model by ESTATICS. . . . . 6.2.4 Correction for Instrumental B1 -Bias. . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.5 Correction for the Bias Induced by Low SNR . . . . . . . . . . . . . . . 6.2.6 Structural Adaptive Smoothing of Relaxometry Data . . . . . . .

155 155 155 156 157 162 166 168 173

7

Inversion Recovery Magnetic Resonance Imaging . . . . . . . . . . . . . . . . . . . . . . 7.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Tissue Porosity Estimation by Inversion Recovery MRI–based Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Generating a Simulated Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Estimation of Parameters from IR MRI Data in a Mixture Model . . .

181 181

A Smoothing Techniques for Imaging Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1 Non-parametric Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.1.1 Kernel Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2 Adaptive Weigths Smoothing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2.1 Local Constant Likelihood Models . . . . . . . . . . . . . . . . . . . . . . . . . . . A.2.2 Patch-Wise Adaptive Weights Smoothing (PAWS) . . . . . . . . . . A.3 Special Settings in Neuroimaging Experiments. . . . . . . . . . . . . . . . . . . . . . . A.3.1 Simultaneous Mean and Variance Estimation . . . . . . . . . . . . . . . . A.3.2 Vector Valued Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.3.3 Diffusion Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.3.4 Tensor-Valued Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A.3.5 Model-Driven Smoothing of Observed Images . . . . . . . . . . . . . .

191 191 193 195 195 205 206 206 208 209 210 211

181 182 185

B Resources for Neuroimaging in R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 B.1 An Overview on Selected R Packages for Neuroimaging . . . . . . . . . . . . 214 B.2 Open Neuroimaging Data Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 C Data, Software and Hardware Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.1 How to Get the Example Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.2 Packages and Software to Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.3 How to Acquire and Organize the Example Data . . . . . . . . . . . . . . . . . . . . . C.3.1 Data from the ‘Kirby21’ Reproducibility Study . . . . . . . . . . . . . C.3.2 Data from OpenNEURO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.3.3 DICOM Example Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.3.4 MPM Data Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C.3.5 Atlas Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

225 225 226 227 228 228 229 230 230

xviii

C.4 C.5

Contents

How to Obtain Precomputed Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Acronyms

ADC AIC AR AWS BIDS BET BIC BOLD CHARMED CSF CT dMRI DKI DTI DWI EAP EO EPI ESTATICS FA FACT FAST FC FDR FLAIR FLASH fMRI FOV FSL FWE

Apparent diffusion coefficient Akaike information criterion Autoregressive Adaptive weights smoothing Brain Imaging Data Structure Brain extraction tool Bayes information criterion Blood oxygenation level dependent Composite hindered and restricted model of diffusion Cerebrospinal fluid X-ray computed tomography Diffusion-weighted magnetic resonance imaging Diffusion kurtosis imaging Diffusion tensor imaging Diffusion-weighted images Ensemble average propagator Effective order Echo planar imaging Estimating the apparent transverse relaxation time (.R2 ) from images with different contrasts Flip angle or fractional anisotropy Fiber assignment by continuous tracking FMRIB’s Automated Segmentation Tool Functional connectivity False discovery rate Fluid-attenuated inversion recovery Fast low-angle shot Functional magnetic resonance imaging Field of view FMRIB Software Library Family-wise error xix

xx

FWHM GA GE GLM GM GRAPPA HARDI HBM HRF ICA IC IT ITK IR-MRI IR-MRE JSON LANE MCMC MD MNI MT MPM MRI MRE MVPA MPRAGE NLM (w)ODF Q-ball qMRI PAWS PCA PD PET PGSE (ms)POAS PVA-FA PS RF RFT ROI SE SENSE SNR

Acronyms

Full width half maximum Geodesic anisotropy Gradient echo General linear model Gray matter Generalized autocalibrating partial parallel acquisition High angular resolution diffusion imaging Human brain mapping Hemodynamic response function Independent component analysis Independent component Inversion time Insight Segmentation and Registration Toolkit Inversion recovery magnetic resonance imaging Inversion recovery magnetic resonance elastography JavaScript object notation Local adaptive noise estimation Markov chain Monte Carlo Mean diffusivity Montreal Neurological Institute Magnetization transfer Multi-parameter mapping Magnetic resonance imaging Magnetic resonance elastography Multivariate pattern analysis Magnetization-prepared 180 degrees radio frequency pulses and rapid gradient-echo Non-local means (Weighted) orientation distribution function Qball imaging Quantitative magnetic resonance imaging Patchwise adaptive weights smoothing Principle component analysis Proton density Positron emission tomography Pulsed gradient spin echo (Multi-shell) position orientation adaptive smoothing Partial volume-corrected fractional anisotropy Propagation-separation approach Radio frequency Random field theory Region of interest Spin echo Sensitivity encoding (for fast MRI) Signal-to-noise ratio

Acronyms

SPM TE TR WM

xxi

Statistical parametric map Echo time Repetition time White matter

Chapter 1

Introduction

Images are common in our lives. They come as simple photographs or as the result of various medical, technical, or scientific experiments and are often very easy to interpret for our visual capabilities as humans. It was therefore a real revolution when Lauterbur and Mansfield invented the use of the magnetic resonance phenomenon to generate images of the human body probably in the same way as X-ray. It enabled in-vivo images of soft tissues and even better it was not based on ionizing radiation, like Computed Axial Tomography (CT) or Positron Emission Tomography (PET), but on magnetic fields and thus harmless and applicable in healthy subjects. Related to the subject of this book, this stipulated a lot of neuroscientific research on structure and function of the human brain. Often statistical models and methods are needed for the understanding of the information that is contained in the images. This has become even more important as neuroimaging evolved from providing images in two dimensions to three-dimensional volumes or time series of volumes or even data in five- or sixdimensional spaces. Then visual inspection becomes difficult if not impossible, and the information has to be aggregated by appropriate methods. In the following chapters, we will demonstrate how such an analysis can be performed for the three MRI imaging modalities that we work with. Specifically, in Chap. 2, we give a very short introduction into the physics of Magnetic Resonance Imaging (MRI). This includes the description of the image formation process and explains how the excitation of nuclear spins by radio frequency waves leads to a spatial signal that we know as images. It also introduces the four specific MR imaging modalities that we cover in the Chaps. 4, 5, 6, and 7. The chapter might be dropped, if the reader is only interested in the data analysis once the MR images have been reconstructed. Chapter 3 is dedicated to the handling of MRI data. It describes different data formats and how these can be accessed from an R session. As there are many different packages and solutions, we only detail a selection of packages and

© The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 J. Polzehl, K. Tabelow, Magnetic Resonance Brain Imaging, Use R!, https://doi.org/10.1007/978-3-031-38949-8_1

1

2

1 Introduction

functions, which we generally rely on and find useful. This chapter also introduces the standardized BIDS format. Chapter 4 describes the analysis of functional Magnetic Resonance Imaging (fMRI) data. Thereby, we focus on a single-subject analysis with the full pipeline of data preprocessing, the General Linear Model, and inference with correction for the multiplicity of the statistical tests. Part of the chapter elaborates on the use of structural adaptive smoothing procedure in fMRI, which we specifically developed. We also include alternative fMRI analysis methods, i.e., others then the mass-univariate approach. The chapter concludes with a section on functional connectivity. The second MR imaging modality is diffusion-weighted MRI in Chap. 5. Diffusion MRI is prone to noise, with low signal-to-noise ratio (SNR) in case of high resolution and large diffusion gradients. There, we discuss properties of minimally processed data, the necessary pre-processing steps in dMRI and the effects of low SNR in modeling. We, in detail, describe a number of diffusion models ranging from the Diffusion Tensor model to tensor mixtures and to the Orientation Distribution Function. We outline structural adaptive smoothing methods that are able to reduce the noise without blurring fine structures. Based on the specific diffusion models, we describe fiber tracking methods and introduce the concept of structural connectivity. DMRI is part of quantitative MRI as it infers on physical quantities, here the direction-dependent diffusion constant. Specific sequences allow for the direct estimation of the relaxation times of the spin excitation process and other quantitative parameters. In Chap. 6, we therefore discuss a relatively new sequence called MultiParameter Mapping. We describe the estimation model, required bias correction methods, and a structural adaptive smoothing method for this kind of data, which allows for noise reduction especially at high spatial resolutions. Chapter 7 focuses on the analysis of data from inversion recovery magnetic resonance imaging (IR-MRI). Using a series of acquisitions for different inversion times, it can be used to infer on quantitative parameters like the relaxation time .T1 but also on microstructural tissue properties like its porosity. One connecting element of Chaps. 4, 5, 6, and 7 is the structural adaptive smoothing methods based on the Propagation-Separation approach (Polzehl and Spokoiny 2006) that come in different flavors depending on the specific modality. We therefore review its developments in Appendix A and discuss its relation to general nonparametric smoothing methods. Appendix B gives an overview over R packages that are related to neuroimaging and describes data sources. Finally, Appendix C summarizes data, packages, and hardware requirements for the examples given in this book. Using these (almost), all results and figures in this book can be reproduced. This book focuses on neuroimaging analysis with R, i.e., the combination of the analysis, mainly statistical, of neuroimaging data, with its implementation in a specific programming language. Such an approach naturally remains incomplete. However, we can recommend a number of excellent textbooks for further reading and more details. For example, regarding R we like to refer to the excellent book (Wickham 2019).

1 Introduction

3

The physics of Magnetic Resonance Imaging (MRI) is explained in Callaghan (1991). For readers without a strong background in physics, the first chapters in Huettel et al. (2014) provide an accessible explanation both as an overview and a more in-depth elaboration. A comprehensive introduction into the analysis of Magnetic Resonance Imaging data is provided in Jenkinson and Chappell (2017). Functional Magnetic Resonance Imaging (fMRI) and its analysis is the actual topic of Huettel et al. (2014). Some books on fMRI especially from a statistical perspective are Friston et al. (2007), Lazar (2008), or Poldrack et al. (2011). The recent and very comprehensive collection in Ombao et al. (2016) provides not only a state-of-the art review of data analysis in fMRI, but also for Diffusion Magnetic Resonance Imaging (dMRI), which is the second important MRI modality, which we cover in this book. For an introduction into dMRI, we refer to Johansen-Berg and Behrens (2013) or Jones (2010). Last but not least as a specific recommendation for those readers interested in brain connectivity, we mention Sporns (2011). For highresolution connectomic fingerprinting, we refer to Mansour L. et al. (2021).

Chapter 2

Magnetic Resonance Imaging in a Nutshell

2.1 The Principles of Magnetic Resonance Imaging Since its invention in the early seventies by Paul C. Lauterbur (Lauterbur 1973; Mansfield and Grannell 1973) and Peter Mansfield (Mansfield 1977), for which they shared the 2003 Nobel prize in Physiology and Medicine, Magnetic Resonance Imaging (MRI) has evolved into a versatile tool for the in-vivo examination of tissue. One of the reasons for this is that it provides a large number of image contrast mechanisms especially suited for imaging soft tissue. Furthermore, unlike X-ray Computed Tomography (CT) and Positron Emission Tomography (PET) it does not rely on high energetic radiation but on the interaction of a strong magnetic field and resonant radio frequency (RF) waves with the atomic nuclei. Hence, it does in principle not harm the examined tissue and can be applied also in healthy subjects. Thus, MRI is a perfect tool for the examination of the living brain in neuroimaging which is the subject of this book. MRI is based on the nuclear magnetic resonance phenomenon. For a very comprehensive introduction into the physics we refer to the excellent textbook of Callaghan (1991). For those readers who do not have a strong background in physics the first chapters in Huettel et al. (2014) may be a more appropriate choice. Although MRI is based on quantum mechanical properties of the particles at the subatom level, the large ensemble of particles in the tissue allows for a semi-classical description that can be relatively easy accessed, cf. also Hanson (2008). Here, we very(!) shortly review the basic ideas of MRI.

2.1.1 The Zeeman effect for Atomic Nuclei The behavior of atomic nuclei is inherently quantum mechanical. Mathematically, the states of quantum mechanical objects are described by eigenfunctions of © The Author(s), under exclusive license to Springer Nature Switzerland AG 2023 J. Polzehl, K. Tabelow, Magnetic Resonance Brain Imaging, Use R!, https://doi.org/10.1007/978-3-031-38949-8_2

5

6

2 Magnetic Resonance Imaging in a Nutshell

operators in some Hilbert space that correspond to observable quantities. Typically, the set of eigenvalues for these observables is discrete rather than spanning a continuous range. For MRI these are, e.g., the energy of a particle and the nuclear spin I , which every atomic nucleus possesses. I is an angular momentum and can have an integer or half-integer value in units of ., the Planck constant divided by .2π . For example, a .1 H (proton), a .13 6 C , or a 1 19 2 . F nucleus have .I = . A deuteron . H has .I = 1, while the predominant carbon 9 2 isotope .12 6 C has no spin .I = 0. Here, we will only be concerned with the hydrogen nucleus .1 H as it is omnipresent in biological tissue and is mainly used in MRI. We generally describe the quantum mechanical states of the spin of a single .1 H nucleus in terms of the eigenfunctions of the z-component .Iz of the spin operator. Then, there exists two spin states having a value of .± 12 for .Iz . As the spin operator is an angular momentum, quantum mechanical commutation rules dictate, that the eigenstates of .Iz are not eigenstates of the x- and y-component. This means, that once the z-component is measured, neither of the other two components can be measured simultaneously, which gives rise to the precession movement of the macroscopic magnetization vector considered in the next section. Nuclear magnetic resonance is now based on the Zeeman effect for the nuclear energy levels (Callaghan 1991). The effect describes the splitting of the energy levels of an atomic nucleus in the presence of some external magnetic field .B0 . This splitting arises from the interaction of the field .B0 with the nuclear magnetic momentum .μ of the nucleus, which in turn is due to the nuclear spin I . For convenience we choose the magnetic field to be aligned in z-direction, hence 0 = (0, 0, B0 ). The splitting of the spectral lines is then according to the value .B of .Iz , see Figure 2.1, and leads to a small difference in energy of the two states which is of size: ΔE = γ B0

.

Here, .γ is the gyromagnetic ratio, which is an intrinsic property of the nucleus under consideration.

  HH H

?

Iz = − 12

gB0

6

Iz = + 12

Fig. 2.1 The Zeeman effect for a nuclear spin of size .I = 12 shows the splitting of the energy levels of a particle in the presence of a magnetic field. As a result the state with anti-parallel spin 1 .I = − has a slightly higher energy. 2

2.1 The Principles of Magnetic Resonance Imaging

7

2.1.2 Macroscopic Magnetization Vector In thermal equilibrium there will be a population difference for these states according to the Boltzmann factor, with less than the half of all nuclei in the higher energetic state. Summing up all magnetic moments of all nuclei in the ensemble,  All states of this gives rise to a macroscopically measurable magnetization .M.  Specifically, the temporal the ensemble can then be described in terms of .M.  is governed by the equation: development of the bulk magnetization .M

.

 ∂M  × B0 ) = γ (M ∂t

where .× denotes the cross product. The general solution of this equation is a  around the z-axis with the Larmor frequency precession movement of .M ω0 = γ B0 ,

.

which is in the radio frequency regime. For example, for a proton (.1 H) in a magnetic field .B0 = 3T, we find .ω0 = 128MHz. In thermal equilibrium the transverse  vanishes and .M  = (0, 0, M0 ). component of .M Note, that this interpretation for the precession movement is only valid for the  The transverse component of a single nuclear spin macroscopic magnetization .M. is not observable due to the above mentioned commutation rules of the spin operator. This contradiction solves when we consider the evolution operator of the quantum mechanical state, which describes a rotation around z with frequency .ω0 . Although a single transverse spin component is not observable, the ensemble behavior sums up to a macroscopic transverse magnetization which rotates with Larmor frequency.

2.1.3 Spin Excitation and Relaxation It is possible to excite this system of spins by a transverse oscillating field .B1 with the resonance frequency .ω0 . Having in mind the typical values for .ω0 , this is basically the application of a transverse radio frequency wave. A detailed  is examination of this excitation process yields, that the magnetization vector .M displaced from its equilibrium alignment with the z-axis. The (flip) angle of this excitation of duration t is .α = ω1 t, where .ω1 = γ B1 is the precession frequency around the, say, x-axis due to the field .B1 , see Figure 2.2. After such an excitation,  which is then precessing at there is a non-vanishing transverse component of .M, frequency .ω0 around the z-axis. Quantum mechanically, the resonant excitation can be interpreted as switching a number of spins from the lower to the higher energy state in the Zeeman levels,  which lowers the longitudinal component .Mz of .M.

8

2 Magnetic Resonance Imaging in a Nutshell

 by a transverse resonant excitation field .B1 , Fig. 2.2 Displacement of the magnetization vector .M specifically in x-direction, i.e. an x-pulse.

Once the transverse pulse is turned off, the system returns to the equilibrium state by individual nuclei switching back to the lower energy state until the equilibrium  rotates population is reached again. Macroscopically, the magnetization vector .M  back to z direction. The precession movement of .M induces a measurable current in the receiver coils placed around the tissue. Physically, there are two processes that govern the relaxation process and that operate on different time scales. The  relaxes exponentially with time constant .T1 due to longitudinal component of .M spin-lattice relaxation. On the other hand, the relaxation of the transverse component has a different time scale .T2 as it has different physical origin and is mainly due to spin-spin-relaxation. Using the notation .M+ = Mx + iMy for the transverse  we get the Bloch equations component of .M .

∂M+ M+ = −ω0 M+ − ∂t T2 ∂Mz = −(Mz − M0 )/T1 ∂t

for the phenomenological description of the relaxation process. Due to magnetic field inhomogeneities, the transverse signal can decay even faster then with time constant .T2 , this time is usually denoted .T2 . The solution of these equations is given by M+ = Mxy0 exp(−t/T2 ) exp(−iω0 t)

.

Mz = M0 (1 − exp(−t/T1 ))

2.1 The Principles of Magnetic Resonance Imaging

9

where .Mxy0 denotes the initial magnitude of the transverse magnetization. The measured MR-signal then reflects the sum of all transverse magnetization in the bulk. MRI requires successive excitations with a characteristic time between the excitation pulses, known as .TR (repetition time). As the relaxation time .T1 is typically rather large the new excitation may occur without full recovery of the longitudinal magnetization. Thus the MR signal is basically given by S = M0 (1 − exp(−TR/T1 )) exp(−t/T2 )

.

(2.1)

2.1.4 Spatial Localization and Pulse Sequences In a static magnetic field .B0 all spins possess the same Larmor frequency .ω0 . So do all electromagnetic waves from the relaxation processes after excitation. Thus, it is not possible to resolve the source of a signal from any specific location of the bulk. It was the core idea of Lauterbur and Mansfield how to determine the spatial location of the signal and make nuclear magnetic resonance an imaging technique. Specifically, the spatial resolution of MRI is achieved through the additional application of magnetic field gradients leading to spatially varying magnetic field and consequently Larmor frequency. The application of radio frequency pulses for excitation in combination with magnetic field gradients form specific MR sequences. Depending on the desired MR contrast there exist a plethora of specific sequences. This variability is one of the sources of the enormous interest in MRI. Most common in MRI are two basic experimental designs for MR sequences, namely the gradient-echo (GE) and the spin-echo (SE) sequence. For a detailed introduction we refer the reader to the textbooks Callaghan (1991) and Huettel et al. (2014). The basic difference between a gradient-echo and a spin-echo sequence is that in the latter an additional .180◦ pulse flips the magnetization of the spins to the opposite direction. This refocusing pulse eliminates the effects of magnetic field inhomogeneities, such that in Eq. (2.1)  .T2 enters instead of .T for gradient-echo sequences. 2 The analysis of the MR signal size at the echo time .t = TE of the acquisition of the signal echo for different choices of .TR and .TE, see Eq. (2.1), reveals that the contrast of the signal from tissues with different .T1 relaxation times is largest for intermediate .TR and short .TE (.T1 -weighted image). For long .TR and intermediate .TE the signal contrast for tissue with different .T2 times is enhanced (.T2 -weighted image), while proton density weighted images (P Dw) are related to long .TR and short .TE. Figure 2.3 provides orthographic views for MR brain images obtained within the ’Kirby21’ reproducibility study (Landman et al. 2011) using three different imaging sequences:

10

2 Magnetic Resonance Imaging in a Nutshell

Fig. 2.3 Left: Example .T1 -weighted image, Center: Example .T2 -weighted image, Right: structural fluid attenuation inversion recovery (’FLAIR’) magnetic resonance image.

if(!exists("baseDir")) baseDir