Hi! I'm Dr. Eric Barnhill.

And this is my online CV. It is coded in reveal.js. You can navigate it using your arrow keys.

I have a PhD in medical physics and currently work in experimental radiology, doing a mix of image processing, statistical analysis, software engineering and machine learning. Now, I am eager to bring my skills to data science. Please navigate right to learn more about me and the skills I can offer. Or you can just download my CV as a pdf right here.

Table Of Contents

Welcome to my online portfolio. You can click on Section V to get a quick summary of my skill set, or learn details of selected projects in sections II-IV, while section I contains background about my field. Click on a section to jump, or navigate right to take the full tour.

  1. Background: About My Field
  2. My Work: Denoising
    1. Phase Unwrapping
    2. Wavelet Denoising
    3. Wave Decomposition, And Finding a New Biomarker
  3. My Work: Wave Inversion
    1. Stacked Frequency Wave Inversion
    2. Stacked Inversion With Finite Volumes
    3. Machine Learning for Elasticity Estimation
  1. My Work: Statistical Analysis
    1. Mass-Univariate Modeling for Functional MRE of Skeletal Muscle
    2. Bayesian Hierarchical Modeling for Functional MRE
    3. Cluster Analysis of Combined Perfusion/Elasticity Brain Data
  2. Summary: What I Offer As A Data Scientist

I. Background

Magnetic Resonance Elastography (MRE) uses MRI scanners to create images of the human body, but with a twist: while you are being scanned, your body is gently vibrated, sending small waves through your tissue. We recover these waves using a special motion-sensitive scanning technique. Navigate down to learn some more background about this technique. Navigate right to go to details about my work.

MRE Encodes Waves Into MRI Scans

When viewed in the typical way, MRE images are typical fluid-weighted anatomical scans (in this case of the brain). However, if we look at a different quantity in these images (known as the phase), we something unusual: waves are travelling through this brain. We accomplish this by faint vibration of the tissue with a pressure driver during the MRI acquisition, encoding the waves into the MRI image with a special sequence.
An MRE magnitude image of the human brain.

Unlike more typical MRI, the MRE encodes waves into the phase of the image.

Tissue Stiffness Is Invisible To Ordinary MRI

These waves contain information about your tissue's mechanical stiffness, which is considered of outstanding medical interest, as it is sensitive to tissue changes that are invisible to ordinary MRI, such as muscle activation... ...or abdominal pathology, such as diseases of the liver and spleen. Here the liver (image left) looks similar in all the typical MRI (left column), but shows dramatic differences in MRE (right column).
Muscle contraction is invisible to MRI but not MRE.

Source: Tzatsch et al., Medical Im. An. 2016:30:1-10

My Work: Linking Physicist To Doctor

The MRI physicist produces the raw phase images on the left. Three steps are required before they are clinically useful:

My Work: Linking Physicist To Doctor

The MRI physicist produces the raw phase images on the left. Three steps are required before they are clinically useful:
Phase Unwrapping

My Work: Linking Physicist To Doctor

The MRI physicist produces the raw phase images on the left. Three steps are required before they are clinically useful:
Phase Unwrapping Denoising

My Work: Linking Physicist To Doctor

The MRI physicist produces the raw phase images on the left. Three steps are required before they are clinically useful:
Phase Unwrapping Denoising Wave Inversion
These intermediate images, as well as their statistical analysis, are my job.
The following three sections will discuss my contributions to the image processing and statistical analysis of MRE data. Navigate right for more or return to the Table of Contents.

II. Denoising

Modern denoising is a statistical process in which we estimate the true signal with the minimum risk. For a longer discussion of this see my book chaper in Magnetic Resonance Elastography: Physical Background and Medical Applications.

MRE poses several unique denoising challenges due to the size of the data (4D, millions of voxels) in combination with phase-based imaging and harmonic wave propagation. Below I describe three denoising projects for which I had to come up with novel solutions and algorithms.

Phase Unwrapping

The phase of a signal is an angular distance that extends from 0 to \( 2\pi \). In MRE, wave propagation is encoded in the phase of the MRI image. Angles don’t get larger than \( 2\pi \), so if the encoded measurement is greater than \( 2\pi \), the values “wrap” around to zero again. To get a coherent image, these “wrapped” phase images must be “unwrapped”. It is a notorious integer-programming problem. There are some famous approximations in 2D, some of which perform slowly in 3D. However, our technique produces large amounts of 4D data which required error-free unwrapping in clinical time frames and no research had been published on this. Wrapped and unwrapped brain data.

Phase Unwrapping

I surveyed and analyzed mathematically all widely cited phase unwrapping algorithms since 1998. I created a test data set and an evaluation methodology whose results are shown to the right.

Phase Unwrapping

Altogether only three algorithms performed adequately under the experimental conditions -- two from the literature, and one I developed myself. I published these results in my paper Real Time 4D Phase Unwrapping in the journal Magnetic Resonance in Medicine.

Phase Unwrapping

Simultaneous with publication of the paper, I coded and released PhaseTools, a Java application that implemented the three algorithms.

Wavelet Denoising

MRE sensor noise also poses a unique juxtaposition of problems. Because the signal (the propagating wave) is heavily damped, the SNR is constantly changing across the image. Further, the wave itself is only piecewise smooth, as human tissue is full of membranes and interfaces that break and deflect the wave. A plotline across the waves shows changing amplitudes and noise levels.

Wavelet Denoising

Prior to my arrival, all groups removed sensor noise with smoothing filters. However I saw that this approach could not be compatible with sharp, high-resolution MRE. Smoothing would blur the signal between the tissue and the interfaces, eliminating the possibility of making claims about fine-grained measurements. I needed to develop a new solution. Smoothing the waves removes noise but also boundaries.

Wavelet Denoising

I determined that a complex wavelet basis was considered optimal for our class of images, which contained piece-wise smooth complex waves with discontinuities. I started a years-long collaboration with one of their inventors, Ivan Selesnick of NYU. Source: Selesnick & Kingsbury, IEEE SPM, 2005

Wavelet Denoising

In the end, the sensitivity of our wave inversion (see next section) meant that even the best available wavelet denoising techniques were not quite adequate. I had to develop my own wavelet basis, an undecimated complex dual-tree basis, to get the sharpness and stability I wanted.

Wavelet Denoising

This work was published in my 2016 paper Nonlinear Multiscale Regularization in Magnetic Resonance Elastography in the journal Medical Image Analysis. The code for the denoising was originally developed in Matlab and is in my MREdge repository in that language. I later incorporated it into my Java Multi-Resolution Analysis Library in Java form.

Wave Decomposition: A New Biomarker?

In MRE we typically measure the propagation of a 20-40mm long shear wave. We have to filter out some low frequency "artifact" to isolate this wave. An elastogram of the abdominal shear wave.

Wave Decomposition: A New Biomarker?

However I noticed that when the artifact is left in, in abdominal images, the impact on the image is different by organ. This suggests that buried in this artifact is a coherent signal that is differentiable by organ. Poroelastic theory, the physics of fluid-filled viscoelastic matrices, predicts a slow pressure wave about 8 times longer than the shear, which is in the range of what I observed, and which would be a valued biomarker in its own right. When the low frequencies are left in, organs like the liver rise modestly in value, but more compressible organs (like spinal disc) increase greatly

Wave Decomposition: A New Biomarker?

I created a bank of narrowband log-Gabor filters to probe the "image-frequency joint resolution" of the image. Bank of log-Gabor filters at normalized frequency \( \omega_{0} = 0.104 \).

Wave Decomposition: A New Biomarker?

I then summed the filter responses at each frequency at each position, to estimate waves present at each location in the image. Response of an abdominal wave image to the same filter bank.

Wave Decomposition: A New Biomarker?

Pooling the filter response results by organ produced charts like that at right: A mixed distribution with two peaks. One peak is exactly in the expected range of the shear wave. The other is at spatial frequencies well below the shear wave -- likely the poroelastic wave. I separated the data into two distributions using Bayesian mixture modelling and identified the modes of the distribution, shown with red points. Our first proceedings with this method are under review and we are applying the method to organs in varying states of compression. Pooled frequency response by organ, here the spleen, for a cohort of 11 subjects.
The denoised data is fed to the wave inversion algorithm which converts the waves into an elasticity map. Click right to learn about my work in wave inversion or jump to the Table of Contents.

III. Wave Inversion

At the heart of MRE data science is wave inversion, in which the length of the propagating wave is estimated at each voxel, with the hope of creating a high-resolution map of the shear modulus.

Wave inversion is a trade-off between resolution, stability, and computational feasibility. In my career I have sought to continually push the bounds of the wave inversion through the development of new models, algorithms, and software, including developing my own vision for machine learning in this field.

Stacked Frequency Wave Inversion

To invert the wave we solve a form of the conservation of momentum equation \( \nabla(\mu \epsilon) = 0 \), where \( \mu \) is the stiffness-related quantity we seek (the shear modulus) and and \( \epsilon = (u_{i,j} + u_{j,i}) \) is the tensor of strains estimated from the encoded 3D waves \( u \). The strains can be estimated from the given waves. However, direct solution of this full equation requires a boundary on \( \mu \) which is very difficult to estimate. \[ \] \[ \small \left[ \mu (u_{i,j}+u_{j,i}) \right]_{,j} + p_{,i} = \] \[ \small - \rho \omega^{2} u_{i}~ in ~\Omega \] \[ \] \[ \small p = \lambda u_{k,k}~in~\Omega \] \[ \] \[ \small u_{i} = \hat{u}_{i}~on~\partial \Omega_{1i} \] \[ \] \[ \small \left[ \mu (u_{i,j} + u_{j,i}) + p \delta_{ij} \right] n_{j} = \] \[ \small \hat{T}_{i} ~on~\partial \Omega_{2i} \]

Stacked Frequency Wave Inversion

The most common approach is to simplfy this model by assuming the material is homogeneous, neglecting the gradient of \( \mu \). However this will cause the method to be inaccurate in regions of rapid change and near boundaries, which are clinically very important scenarios. \[ \] \[ \small \mu = - \rho \omega^{2} \frac{\mathbf{u}}{\nabla^{2}\mathbf{u}} \]

Stacked Frequency Wave Inversion

In collaboration with mathematician Penny Davies of the University of Strathclyde, I developed a new inversion method that combined results from multiple acquisitions at different driving frequencies to eliminate the boundary condition and produce a unique and stable estimate of \( \mu \).
\[ \tiny \begin{bmatrix} \nabla \cdot \epsilon_{1} & \epsilon_{1} \\ \nabla \cdot \epsilon_{2} & \epsilon_{2} \\ \dots & \dots \\ \nabla \cdot \epsilon_{n} & \epsilon_{n} \\ \end{bmatrix} \begin{bmatrix} I \\ \nabla^{T} \end{bmatrix} \mu = \] \[ \large \] \[ \tiny - \rho \begin{bmatrix} \mathbf{\omega}_{1} & & & \\ & \mathbf{\omega}_{2} & & \\ & & \dots & \\ & & & \mathbf{\omega}_{n} \\ \end{bmatrix}^{2} \begin{bmatrix} \mathbf{u}_{1} \\ \mathbf{u}_{2} \\ \dots \\ \mathbf{u}_{n} \\ \end{bmatrix} \]

Stacked Frequency Wave Inversion

This method uses a global solve across the different frequencies, producing the smoothest admissible solution across the group. It is much stabler, particularly when less acquisitions are available, and shows no artifact at interfaces like simpler models. The paper on this method is currently in revision. The code for this method is incorporated into my MREdge software pipeline

Stacked Inversion With Finite Volumes

Because the previous method requires a global solve, it is quite stable but also somewhat smoothed. Many MRE applications are interested in preserving fine edges and tissue boundaries. To accomplish this a mathematical reformulation was needed I collaborated with a mathematician from Católica Universidad de Chile, Joaquin Mura, who had developed a finite-volume approach, modelling each voxel in the image as a cube of constant value. The method keeps all the modelling improvements but only evaluates local neighborhoods, keeping edges sharp and the calculation time fast. On our brain acquisitions, the method renders substantially more details and interfaces than the previous method. Our first proceedings are under review. $$ G(V) = -\frac{1}{2 b\cdot b^*} \left( \omega^2 \rho p \cdot b^* + \lambda q \cdot b^* \right) $$ $$ b = \frac{1}{2}\int_{\partial V} (\nabla u + \nabla u^T)n\, ds, \quad $$ $$ p = \int_V u\, dx, \quad $$ $$ q = \int_{\partial V} (\nabla\cdot u) n \, ds. $$

Machine Learning For Elasticity Estimation

The first applications of machine learning to the inverse elasticity problem have emerged in the last couple of years. I see great potential in using ML to overcome inherent resolution and stability limitations. Consequently I have started several ML initiatives and describe two of them here.

ML 1: Reducing Frequencies For Faster Acquisitions

Currently we gain stability by combining 7-9 repeated acquisitions, however this adds acquisition time. In this project acquisitions with 3 frequencies are labeled with results from a 9 frequency acquisition of the same individual, to train an AI. We trained a Convolutional Neural Network (CNN) using waves at three frequencies, labeled with results from a nine-frequency set.

ML 1: Reducing Frequencies For Faster Acquisitions

We built a CNN in TensorFlow and trained it on several thousand input-output pairs. Initial results show the AI has learned the inversion, and while smoothed, shows stability typical of acquisitions with many more frequencies.

ML 2: Super-Resolution With Ultra-High-Field Training Set

Our second project uses data collected at ultra-high field strengths, which increase our resolution to 1mm, to inform data collected at clinical field strengths, which have a resolution of 2mm. The data have been acquired and I have written software to co-register these data, with some results at right. As available data is limited, I am now building a model in Keras, combining its automatic data generator with a U-net type network. We are currently training a second network to produce super-resolution results at clinical field strengths.
Once the elasticity maps are created, statistical analysis must be used to extract useful information for basic science or clinical diagnosis. To read about some of my contributions to statistical analysis in my field navigate right, or jump to the Table of Contents.

IV. Statistical Analysis

New kinds of data require new forms of statistical analysis, and with MRE data I have developed a range of novel statistical methods and models to extract insights from MRE images. Navigate down to see three examples of my work as a medical imaging statistician.

Mass-Univariate Mapping of Functional Muscle MRE

As I showed in the Background section, muscle both activated and at rest look effectively identical on typical MRI, but show a dramatic difference in MRE. These data are the first opportunity for scientists to study muscle activation without limitations on depth or field of view -- a new form of functional MRI (fMRI). I developed a novel analysis pipeline akin to brain fMRI, which often runs mass-univariate statistical analysis of the results. Leg muscles show effectively no distinction between relaxed and contracted stats on normal MRI; but show a \( 2 \times \) or more value change with MRE. Source: CRIC, U. Edinburgh

Mass-Univariate Mapping of Functional Muscle MRE

For the co-registration, because the muscle boundaries are not clearly visible in the MRI, I devised a method of manual landmarking with each muscle, then registering to a target using Moving Least Squares. Details from the moving-least-squares co-registration I developed for the experiment. Source: Barnhill et al. Phys Meas 2013

Mass-Univariate Mapping of Functional Muscle MRE

For the statistical test, I wrote code to perform mass-univariate significance testing on the co-registered data, then threshold for false positives using False Discovery Rate. t-statistic image for the rest-lift leg experiment.
Source: Barnhill et al. Phys Meas 2013

Mass-Univariate Mapping of Functional Muscle MRE

We found varied activity across the muscle during the muscle activation. These results were published in my 2013 paper, Statistical mapping of the effect of knee extension on thigh muscle viscoelastic properties using magnetic resonance elastography in the journal Physiological Measurement.

Bayesian Multilevel Modeling of Functional MRE

In a current project we are studying whether brain mechanical properties alter in reponse to increased cognitive activity, similar to the way typical brain fMRI measures certain kinds of cognitive activity by indirectly measuring changes in blood flow. We expect the mechanical properties will reflect changes in perfusion. We aim to replicate the "classic" fMRI result, of alteration of visual cortrex in respose to visual stimulus, using MRE. Source: New Zealand Brain Research Institute

Bayesian Multilevel Modeling of Functional MRE

Compared to fMRI, MRE is more impacted by outliers, and has lower spatial resolution, and is acquired in thinner slabs. To do justice to the data I developed an appropriate Bayesian multilevel model. $$ y_{ijkl} \sim Gamma(Sh, \frac{Sh}{\mu_{jkl}}) $$ $$ log(\mu_{jkl}) = \beta_{0} + $$ $$ \beta_{1}^{j}, j \in \{ 1 \dots 4 \}+ $$ $$ \beta_{2}^{k}, k \in \{ 1 \dots 13 \}+ $$ $$ \beta_{3}^{k}I_{cond=ON} + $$ $$ \beta_{4}^{l}, l \in \{ 1 \dots 4070 \} $$ $$ \beta_{m} \sim \mathcal{N}(\mu_{m}, \sigma_{m}^2), \mu \sim \mathcal{N}(0, 1e6) $$ $$ \sigma, Sh \sim \mathcal{U}(.001, 100) $$

Bayesian Multilevel Modeling of Functional MRE

In a preliminary analysis I showed that gamma-distribution modelling fit our data better than normal distributions. Gamma distributions fit our data better and are easy to work with in a Bayesian framework.

Bayesian Multilevel Modeling of Functional MRE

I coded up the model in a statistical language called JAGS. We are still acquiring scans in this project, which is ongoing. I am also applying a similar model to a new muscle-damage study. Part of JAGS code for the above model.

Cluster Analysis of Combined Elasticity-Perfusion Brain Data

Last year we acquired the first combined elasticity and perfusion data in the human brain, to study the relation between the two in various brain organs. While elasticity and perfusion coefficients are expected to relate, how they relate depends on brain organ structure. Source: Hetzer et al., JCBF, 2017

Cluster Analysis of Combined Elasticity-Perfusion Brain Data

I ran k-means-clustering and silhouette analysis to identify relationships between deep gray matter structures, elasticity values and perfusion values. Source: Hetzer et al., JCBF, 2017

Cluster Analysis of Combined Elasticity-Perfusion Brain Data

This unsupervised learning clustered our results into two groups of brain organs with different blood vessel properties. Based on this we were able to devise a predictor variable, the "flux rate" which enabled linear prediction of perfusion from elasticity values. Source: Hetzer et al., JCBF, 2017

Cluster Analysis of Combined Elasticity-Perfusion Brain Data

These results were publised in the article Perfusion alters stiffness of deep gray matter publised in the Journal of Cerebral Blood Flow and Metabolism.
That concludes my overview of my work: combining image processing and statistical analysis to advance my field, with software engineering and machine learning as key tools. In the last section, I'll summarize what I see as my skill set for this data science transition. Navigate right to read it, or jump to the Table of Contents.

V. Summary

It has been a fascinating few years in experimental radiology. However, I think the most exciting scientific opportunities of this century lie in data, and I want to be a part of it.

I have six years of practical experience with data science problems, a full suite of tools to apply to them, and a body of published work to prove it; I am ready to hit the ground running. Below I make the case for why I should be your next data scientist.

My Skills: Statistics

I have had the good fortune to be in a challenging scientific field with many open questions regarding statistics and data science. I developed Bayesian statistical models that better capture our data, as well as software packages that run the analyses. I additionally developed techniques for co-registration, unsupervised learning, and the testing and validation of image processing advancements.

My Skills: Software Engineering

My software experience is not only extensive, it is lifelong, reaching back to a Java certification in 2000 and beyond. For the last six years I have written code in Matlab and R on a daily, and Java on a near-daily basis. I have committer status at the Apache project and maintain the most widely used Java scientific library for complex numbers. For machine learning, I code using Keras and TensorFlow in a Python notebook. I also have worked in several domain-specific languages including JAGS, Stan, Halide, and Siemens IDEA. Repositories that have accepted my pull requests include ImageJ/Fiji, GNU Octave, NiftiJIO, and Bio-Formats/OME. My GitHub can be perused here.

My Skills: Image Processing

In my six years in the field of image processing, I have been independent and creative. I was the first to introduce cutting-edge denoising techniques, including directional wavelet decompositions, adaptive thresholding, and sparsity promotion, to a field that previously only used simple filters. I have challenged a number of fundamental assumptions in our field about the nature of our images, showing that previous concerns (such as bulk wave, or PDE model) are less important than assumed, and other neglected concerns (such as poroelastic motion, or numerics) are much more important that previously supposed.

My Skills: International Collaborations

I take particular pride in always trying to seek out and work with top experts in a field and never "re-invent the wheel". One of my job's great pleasures has been the initiation of collaborations with a large network of brilliant minds from universities around the world. Some of the scholars outside my home institutions with whom I have have independently reached out, collaborated and published work.

My Skills: Communication and Public Speaking

Finally, with some earlier background in the performing arts, I am comfortable speaking, communicating to others and being on stage. You can see this for yourself in my TEDxBermuda talk I gave in 2013 about my earlier work with children.(I also pursue music-related studies as a "passion project", including this paper, and this one.)

Thank You!

I really appreciate your taking the time to read through my online CV today, and if you are looking for a data scientist, I hope I have piqued your interest. Please drop me a line at ericbarnhill (at) protonmail (dot) ch and I'll get back to you right away. You can also peruse my GitHub, my ResearchGate, or my PubMed. And, of course, help yourself to a PDF of my print CV right here. Have a great day!