Skip to content

Commit

Permalink
deploy: 4ecbd3b
Browse files Browse the repository at this point in the history
  • Loading branch information
agentmess committed Sep 24, 2023
1 parent 873ef0b commit 247051a
Show file tree
Hide file tree
Showing 21 changed files with 249 additions and 337 deletions.
75 changes: 40 additions & 35 deletions Accelerated Imaging Methods.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Artifacts.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ <h2> Contents </h2>
</div>
<section class="tex2jax_ignore mathjax_ignore" id="artifacts">
<h1>Artifacts<a class="headerlink" href="#artifacts" title="Permalink to this heading">#</a></h1>
<p>This notebook includes a simulation of various MRI artifacts, as well as a high-level <span class="xref myst">Artifact Comparison</span> below. The wikipedia entry <a class="reference external" href="https://en.wikipedia.org/wiki/MRI_artifact">https://en.wikipedia.org/wiki/MRI_artifact</a> is also very comprehensive.</p>
<p>This notebook includes a simulation of various MRI artifacts, as well as a high-level Artifact Comparison below. The wikipedia entry <a class="reference external" href="https://en.wikipedia.org/wiki/MRI_artifact">https://en.wikipedia.org/wiki/MRI_artifact</a> is also very comprehensive.</p>
<section id="learning-goals">
<h2>Learning Goals<a class="headerlink" href="#learning-goals" title="Permalink to this heading">#</a></h2>
<ol class="arabic simple">
Expand Down
141 changes: 57 additions & 84 deletions Gradient and Spin Echoes.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MRI System.html
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ <h2>Magnetic Fields<a class="headerlink" href="#magnetic-fields" title="Permalin
</tr>
<tr class="row-odd"><td><p>Magnetic Field Gradients</p></td>
<td><p><span class="math notranslate nohighlight">\(\vec{G}(t)\)</span></p></td>
<td><p>$z4</p></td>
<td><p><span class="math notranslate nohighlight">\(z\)</span></p></td>
<td><p><span class="math notranslate nohighlight">\(\approx 1\)</span> kHz</p></td>
<td><p><span class="math notranslate nohighlight">\(\approx 10\)</span> mT</p></td>
<td><p>Spatial Encoding</p></td>
Expand Down
3 changes: 2 additions & 1 deletion Signal to Noise Ratio.html
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ <h2>SNR Equation<a class="headerlink" href="#snr-equation" title="Permalink to t
<section class="tex2jax_ignore mathjax_ignore" id="snr-efficiency">
<h1>SNR Efficiency<a class="headerlink" href="#snr-efficiency" title="Permalink to this heading">#</a></h1>
<p>The SNR efficiency for MRI provides a measure of overall efficiency within a MRI scan, which is the SNR normalized by the <em>total scan time</em>, <span class="math notranslate nohighlight">\(T_{scan}\)</span></p>
<p>$$SNR_{efficiency} = \frac{SNR}{\sqrt{T_{scan}}} \propto f_{seq}\ \mathrm{Voxel\ Volume}\ \sqrt{\frac{T_{meas} }{T_{scan}}}</p>
<div class="math notranslate nohighlight">
\[SNR_{efficiency} = \frac{SNR}{\sqrt{T_{scan}}} \propto f_{seq}\ \mathrm{Voxel\ Volume}\ \sqrt{\frac{T_{meas} }{T_{scan}}}\]</div>
<section id="snr-efficiency-versus-tr">
<h2>SNR efficiency versus TR<a class="headerlink" href="#snr-efficiency-versus-tr" title="Permalink to this heading">#</a></h2>
<p>The SNR efficiency is useful to examine the choice of TR. It is especially interesting for spoiled gradient-echo sequences where when we can choose to use the optimal flip angle (“Ernst angle”) based on a <span class="math notranslate nohighlight">\(T_1\)</span> value of interest. For these sequences, the optimal flip angle is</p>
Expand Down
56 changes: 28 additions & 28 deletions Spectral-Spatial RF Pulses.html
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,34 @@ <h2> Contents </h2>
<div id="searchbox"></div>
<article class="bd-article" role="main">

<div class="cell docutils container">
<section class="tex2jax_ignore mathjax_ignore" id="spectral-spatial-rf-pulses">
<h1>Spectral-Spatial RF Pulses<a class="headerlink" href="#spectral-spatial-rf-pulses" title="Permalink to this heading">#</a></h1>
<p>Spectral-spatial RF pulses aim to provide both</p>
<ul class="simple">
<li><p>spectral selection, typically to only excite protons in water molecules, and not protons in lipids</p></li>
<li><p>spatial selection, for slice-selective imaging</p></li>
</ul>
<p>These are particularly common in fMRI and diffusion with echo-planar imaging (EPI) in order to eliminate chemical shift displacement artifacts in the image, and are also used for water and/or fat suppression in MR spectroscopy.</p>
<section id="learning-goals">
<h2>Learning Goals<a class="headerlink" href="#learning-goals" title="Permalink to this heading">#</a></h2>
<ol class="arabic simple">
<li><p>Describe how images are formed</p>
<ul class="simple">
<li><p>Understand how spectral-spatial RF pulses work</p></li>
</ul>
</li>
<li><p>Identify artifacts and how to mitigate them</p>
<ul class="simple">
<li><p>Determine when using spectral-spatial RF pulses would help remove chemical shift related artifacts</p></li>
</ul>
</li>
</ol>
</section>
<section id="spectral-spatial-rf-pulse-design">
<h2>Spectral-Spatial RF Pulse Design<a class="headerlink" href="#spectral-spatial-rf-pulse-design" title="Permalink to this heading">#</a></h2>
<p>This is done by creating a 2D excitation profile in both the spectral and spatial dimensions. This is most easily interpreted through excitation k-space, where the RF energy deposited can be Fourier Transformed to reveal the approximate spectral-spatial profile created.</p>
<p>The gradient applied traverses spatial excitation k-space, while time traverses the spectral excitation k-space dimension, as demonstrated by the gradient and k-psace plot below</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-octave notranslate"><div class="highlight"><pre><span></span><span class="c">% setup MRI-education-resources path and requirements</span>
<span class="n">cd</span> <span class="p">.</span><span class="o">./</span>
Expand Down Expand Up @@ -487,33 +514,6 @@ <h2> Contents </h2>
</div>
</div>
</div>
<section class="tex2jax_ignore mathjax_ignore" id="spectral-spatial-rf-pulses">
<h1>Spectral-Spatial RF Pulses<a class="headerlink" href="#spectral-spatial-rf-pulses" title="Permalink to this heading">#</a></h1>
<p>Spectral-spatial RF pulses aim to provide both</p>
<ul class="simple">
<li><p>spectral selection, typically to only excite protons in water molecules, and not protons in lipids</p></li>
<li><p>spatial selection, for slice-selective imaging</p></li>
</ul>
<p>These are particularly common in fMRI and diffusion with echo-planar imaging (EPI) in order to eliminate chemical shift displacement artifacts in the image, and are also used for water and/or fat suppression in MR spectroscopy.</p>
<section id="learning-goals">
<h2>Learning Goals<a class="headerlink" href="#learning-goals" title="Permalink to this heading">#</a></h2>
<ol class="arabic simple">
<li><p>Describe how images are formed</p>
<ul class="simple">
<li><p>Understand how spectral-spatial RF pulses work</p></li>
</ul>
</li>
<li><p>Identify artifacts and how to mitigate them</p>
<ul class="simple">
<li><p>Determine when using spectral-spatial RF pulses would help remove chemical shift related artifacts</p></li>
</ul>
</li>
</ol>
</section>
<section id="spectral-spatial-rf-pulse-design">
<h2>Spectral-Spatial RF Pulse Design<a class="headerlink" href="#spectral-spatial-rf-pulse-design" title="Permalink to this heading">#</a></h2>
<p>This is done by creating a 2D excitation profile in both the spectral and spatial dimensions. This is most easily interpreted through excitation k-space, where the RF energy deposited can be Fourier Transformed to reveal the approximate spectral-spatial profile created.</p>
<p>The gradient applied traverses spatial excitation k-space, while time traverses the spectral excitation k-space dimension, as demonstrated by the gradient and k-psace plot below</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-octave notranslate"><div class="highlight"><pre><span></span><span class="c">% Demonstrate gradient and spectral-spatial k-space trajectoy</span>
Expand Down
Binary file added _images/t2star-spinecho_mild_off-resonance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/t2star-spinecho_no_off-resonance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/t2star-spinecho_severe_off-resonance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/t2star_mild_off-resonance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/t2star_no_off-resonance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/t2star_severe_off-resonance.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 37 additions & 33 deletions _sources/Accelerated Imaging Methods.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,6 @@
" * Reconstruct an image from undersampled raw data\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Formulating the Reconstruction Problem\n",
"\n",
"For image reconstruction, it is helpful to reformulate the MRI Signal Equation, which we can pose for MRI as a linear system and using standard mathematical notation describing systems as:\n",
"\n",
"$$ \\mathbf{y} = \\mathbf{Ex} + \\mathbf{n} $$\n",
"\n",
"where $\\mathbf{y}$ is the acquired data, $\\mathbf{E}$ is the encoding matrix, $\\mathbf{x}$ is the spatial distribution of the transverse magnetization (e.g. image), and $\\mathbf{n}$ is noise\n",
"\n",
"The encoding matrix, $E$, must include a discrete Fourier Transform matrix, representing our data is the Fourier Transform of the transverse magnetization, evaluated at k-space locations. It should also include coil sensitivity profiles in order to support parallel imaging formulations."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -70,9 +55,7 @@
"\n",
"$$ \\mathbf{y} = \\mathbf{Ex} + \\mathbf{n} $$\n",
"\n",
"In 2D Cartesian\n",
"\n",
"vectorized data and images\n",
"where $\\mathbf{y}$ is the acquired data, $\\mathbf{E}$ is the encoding matrix, $\\mathbf{x}$ is the spatial distribution of the transverse magnetization (e.g. image), and $\\mathbf{n}$ is noise. In this formulation, the image is vectorized. For example, 2D FT sampled data and the corresponding 2D image would be converted to:\n",
"\n",
"$$ y = \\left[ \n",
" \\begin{array}{c}\n",
Expand Down Expand Up @@ -100,9 +83,7 @@
"\\right]$$\n",
"\n",
"\n",
"where $\\mathbf{y}$ is the acquired data, $\\mathbf{E}$ is the encoding matrix, $\\mathbf{x}$ is the spatial distribution of the transverse magnetization (e.g. image), and $\\mathbf{n}$ is noise\n",
"\n",
"The encoding matrix, $E$, must include a discrete Fourier Transform matrix, representing our data is the Fourier Transform of the transverse magnetization, evaluated at k-space locations. It should also include coil sensitivity profiles in order to support parallel imaging formulations."
"The encoding matrix, $E$, at a minimum includes a discrete Fourier Transform matrix, $\\mathbf{F}$, representing our data is the Fourier Transform of the transverse magnetization, evaluated at k-space locations. "
]
},
{
Expand All @@ -111,9 +92,19 @@
"source": [
"## Parallel Imaging\n",
"\n",
"For parallel imaging (PI), we need to consider the coil sensitivity profiles, $\\mathbf{C}$, into encoding matrix along with a Fourier Transform encoding matrix, $\\mathbf{F}$:\n",
"For parallel imaging (PI), we need to consider the coil sensitivity profiles, $\\mathbf{C}_i$, for each RF coil into encoding matrix along with a Fourier Transform encoding matrix, $\\mathbf{F}$, as well as a k-space sampling operator, $\\mathbf{S}$, for the measurements from each RF coil, $\\mathbf{y}_i$:\n",
"\n",
"$$\\mathbf{y}_i = \\mathbf{E}_i \\mathbf{x} + \\mathbf{n}_i = \\mathbf{S} \\mathbf{F} \\mathbf{C_i} \\mathbf{x} + \\mathbf{n}_i $$\n",
"\n",
"Here we can return to our original formulation by concatenating the coil dimension, for example as:\n",
"\n",
"$$\\mathbf{y} = [\\mathbf{y}_1 \\ \\mathbf{y}_2 \\ldots \\mathbf{y}_N]$$ \n",
"\n",
"$$\\mathbf{E} = [\\mathbf{E}_1 \\ \\mathbf{E}_2 \\ldots \\mathbf{E}_N]$$ \n",
"$$\\mathbf{y} = [\\mathbf{n}_1 \\ \\mathbf{n}_2 \\ldots \\mathbf{n}_N]$$ \n",
"\n",
"$$ \\mathbf{y} = \\mathbf{Ex} + \\mathbf{n} $$\n",
"\n",
"$$\\mathbf{E} = \\mathbf{F} \\mathbf{C}$$\n",
"\n",
"### Image-space Methods\n",
"Image-space parallel imaging methods (e.g. SENSE) can be formulated as the following optimization problem\n",
Expand Down Expand Up @@ -180,27 +171,40 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Neural Network/Deep Learning Reconstructions\n",
"## Machine Learning Reconstructions\n",
"\n",
"Convolutional neural networks (CNNs), which form the backbone of deep learning (DL), can be used to convert k-space to image data from a subset of data samples as well. Conceptually, these methods can be trained to learn how to incorporate coil sensitivity information like parallel imaging and typical image sparsity patterns like compressed sensing. Since they learn from real-world data, they can learn information that is the most relevant to MRI data and thus have been shown to support higher acceleration factors. \n",
"Machine learning using convolutional neural networks (CNNs), which form the backbone of deep learning (DL), can be used to convert k-space to image data from a subset of data samples as well. Conceptually, these methods can be trained to learn how to incorporate coil sensitivity information like parallel imaging and typical image sparsity patterns like compressed sensing. Since they learn from real-world data, they can learn information that is the most relevant to MRI data and thus have been shown to support higher acceleration factors. \n",
"\n",
"Perhaps the most popular class of DL reconstruction methods for MRI are so-called \"un-rolled\" networks. This term confirms \n",
"These methods can often be considered general solutions to a regularized least-squares objective\n",
"\n",
"Compressed Sensing is formulated as the following optimization problem\n",
"$$\\hat{x}_{reg} = \\arg \\min_\\mathbf{x} \\frac{1}{2} \\| \\mathbf{y} - \\mathbf{Ex} \\|^2_2 + \\mathcal{R}(\\mathbf{x}) $$\n",
"\n",
"$$\\hat{x}_{CS} = \\arg \\min_\\mathbf{x} \\frac{1}{2} \\| \\mathbf{y} = \\mathbf{Ex} \\|^2_2 +\\tau \\| \\mathbf{Wx} \\|_1 $$\n",
"where $\\mathcal{R}(\\cdot)$ can be a parallel imaging or compressed sensing regularizer as above, but can also be implicitly implemented via machine learning techniques. This means that the machine learning reconstruction is attempting to constrain or regularize the reconstruction.\n",
"\n",
"which includes a data consistency term where the data multiplied by the encoding matrix must match the reconstructed image, and a regularization term that enforces that the image is sparse in some other domain through the sparsifying transform, $\\mathbf{W}$.\n",
"Perhaps the most popular class of DL reconstruction methods for MRI are so-called \"un-rolled\" networks. This term comes from the fact these networks are designed to mimic iterations of classical algorithms to solve optimization problems, and each iteration has been \"un-rolled\" into a series of cascaded neural networks. Some popular methods include MoDL and Variational Networks.\n",
"\n",
"Popular sparsifying transforms include total variation (TV), total generalized variation (TGV), and wavelets.\n",
"\n",
"The k-space sampling patterns used for these methods typically use pseudo-random undersampling with a variable density that preferentially increases the number of samples near the center of k-space\n",
"### SNR in ML Reconstructions\n",
"It is difficult to define SNR when using machine learning reconstruction methods, as they inherently perform some denoising when constraining the reconstruction.\n",
"\n",
"\n",
"### SNR in Compressed Sensing\n",
"### Artifacts with ML Reconstructions\n",
"\n",
"A challenge with machine learning reconstructions is that artifacts can be difficult to identify. They can result in an over-smoothed appearance. These methods can also overfit to the learned anatomy and data, meaning features might be erased or hallucinated, although using physics-based techniques provide some assurances of data-consistency.\n",
"\n",
"### Artifacts with Compressed Sensing\n"
"### Reference\n",
"\n",
"For a recent, comprehensive reference on thes methods I reccommend:\n",
"\n",
"Hammernik K, Küstner T, Yaman B, Huang Z, Rueckert D, Knoll F, Akçakaya M. Physics-Driven Deep Learning for Computational Magnetic Resonance Imaging: Combining physics and machine learning for improved medical imaging. IEEE Signal Process Mag. 2023 Jan;40(1):98-114. doi: 10.1109/msp.2022.3215288. Epub 2023 Jan 2. PMID: 37304755; PMCID: PMC10249732.\n",
"\n",
"https://arxiv.org/pdf/2203.12215.pdf\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
18 changes: 13 additions & 5 deletions _sources/Artifacts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "octave"
}
},
"outputs": [
{
"name": "stdout",
Expand All @@ -26,7 +30,7 @@
"source": [
"# Artifacts\n",
"\n",
"This notebook includes a simulation of various MRI artifacts, as well as a high-level [Artifact Comparison](#Artifact-Comparison) below. The wikipedia entry https://en.wikipedia.org/wiki/MRI_artifact is also very comprehensive.\n",
"This notebook includes a simulation of various MRI artifacts, as well as a high-level Artifact Comparison below. The wikipedia entry https://en.wikipedia.org/wiki/MRI_artifact is also very comprehensive.\n",
"\n",
"## Learning Goals\n",
"\n",
Expand Down Expand Up @@ -64,8 +68,12 @@
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "octave"
}
},
"outputs": [
{
"name": "stdout",
Expand Down
Loading

0 comments on commit 247051a

Please sign in to comment.