Bachelor Thesis Tracker

Current Status

Total Time Spent: 30h

Status: I have not hit a wall and do not need new instructions.

Work to be read

Literature Review & Initial Research

First, I was given this research paper: Computing Large Deformation Metric Mappings via Geodesic Flows of Diffeomorphisms [1], with the words:

"We would be heading toward something like this. It involves some neat math, yet it could prove very important for us."

I ran it through Connected Papers and found an important predecessor: Computational anatomy: an emerging discipline [2].

From these two papers and the graphs generated by Connected Papers (attached below), I found what I believe to be the most prominent names in the field of computational anatomy up until the year 2005. These are: Ulf Grenander, Michael I. Miller, Gary E. Christensen, and Mirza Faisal Beg. This surely non-exhaustive list of authors will be my only source for now.

Mathematical Framework

Starting out with the topic of Diffeomorphic Image Registration, I tried to lay out the mathematical framework. To be discussed: do I even understand the problem at hand?

The Brown/Washington Model of Anatomy

The Brown/Washington model of anatomy as formalized in [2] is a quadruple \((\Omega, \mathcal{H}, \mathcal{I}, \mathcal{P})\), where the background space \(\Omega\) is defined as the union \(\Omega = \bigcup_{\alpha} M_{\alpha}\), where \(M_{\alpha}\) are 0, 1, 2, 3-dimensional manifolds, and \(\alpha \in I\), where \(I\) is the set of indexes. \(\mathcal{H}\) is the set of diffeomorphic transformations on the background space, \(\mathcal{H}: \Omega \leftrightarrow \Omega\). \(\mathcal{I}\) is the space of medical imagery and \(\mathcal{P}\) the set of probability measures on \(\mathcal{H}\).

If \(\mathcal{H}\) is constructed to be rich enough, we can operate under the basic assumption that there is essentially only one deformable template (\(I_{temp}\)), i.e., one anatomical ensemble \((\Omega, \mathcal{H}, \mathcal{I}, \mathcal{P})\), which forms a homogeneous space, or what is called homogeneous anatomy.

The basic property of this homogeneous anatomy is that it can be completely generated from one of its elements, defined as \(\mathcal{I} = \mathcal{H}I_{temp}\), \(I_{temp} \in \mathcal{I}\). In the homogeneous anatomy setting, all elements \(I \in \mathcal{I}\) are essentially the same modulo a diffeomorphism in \(\mathcal{H}\).

Note: This simply means that there is a single, ideal anatomy, and all normal biological variations can be generated by transforming this one template.

More generally, as for the disease state, an area that has received less attention than the study of normal anatomy, we shall require a family of templates \(\bigcup_{\alpha} I^{\alpha}_{temp}\) with perhaps varying dimensional transformation classes. The complete anatomy is built from collections of homogeneous spaces \(\mathcal{I}_{total} = \bigcup_{\alpha}(\mathcal{I}^{\alpha}, \mathcal{H}^{\alpha})\).

Within this framework, [2] argues that there are three usecases:

  1. Computation of large deformation maps: Computing diffeomorphisms \(\varphi\) from one anatomy \(I_n\) to \(I_m\), where \(I_n, I_m \in \mathcal{I}\).
  2. Computation of empirical probability laws: Calculating the probability laws \(P \in \mathcal{P}\) on \(\mathcal{H}\), which represent anatomical variation.
  3. Computational inference on population and disease testing and classification: Performing Bayesian classification and testing for anomaly, given prior probability measures.

Although I would like to explore more of the algebraic properties of the group action, I have an inkling my supervisor would rather see me spending time with (1).

Large Deformation Maps

Large deformation mapping, [2] argues, is the generation of bijective maps between templates and targets. These maps are preferably of high dimension, to accommodate the very finest details in variation in individual anatomy.

These large deformation diffeomorphisms are constructed as the solution of an ordinary differential equation corresponding to the transport equation in mechanics. The deformation thus corresponds to flows.

The purpose in constructing invertible maps is that they can be used to study the features of the target anatomies.

Transport Equation

Looking at the computation of these mappings, one inevitably runs into the Transport Equation. Below is the General Transport Equation (1D) with the Diffusion Term D and source term S omitted. From my understanding for LDDMs, we actively avoid them. $$ \frac{\partial u(x, t)}{\partial t} + \frac{\partial (vu(x, t))}{\partial x} = 0 $$

Advection Equation

Here v is constant

$$ \frac{\partial u(x, t)}{\partial t} + \alpha \frac{\partial u(x, t)}{\partial x} = 0 $$

By rearranging this, we can see that the rate of change over time corresponds to the flow across space: \(\frac{\partial u}{\partial t} = -\alpha \frac{\partial u}{\partial x}\). Analytically, the exact solution is just a translation of the initial state: \(u(x, t) = u_{ini}(x - \alpha t)\).

Burgers Equation

Introduces non-linearity by making the advection velocity equal to the state variable itself (\(u\)): $$ \frac{\partial u(x, t)}{\partial t} + u(x, t) \frac{\partial u(x, t)}{\partial x} = 0 $$

This is a crucial stepping stone toward LDDMM. Because the velocity is no longer constant, different parts of the wave travel at different speeds. Faster-moving sections will catch up to slower-moving sections, causing the wave to steepen and actively deform over time.

1. The Method of Lines

Instead of dealing with space and time all at once, one can use the Method of Lines. This strategy makes physical space discrete slices physical space into coordinates, but leaves time continuous.

By doing this, the PDE is fractured into ODEs. Essentially isolating the spatial derivative, calculating the momentary flow at every grid coordinate \(u_{i, j}\) using approximations like Finite Differences or Upwind schemes. This leaves me with an ODE for every pixel: \(\frac{du_i}{dt} = f(t, u)\), leaving the time-stepping to an independent ODE solver (like Euler or Runge-Kutta).

These approximations are our specific spatial discretization schemes:

  • FDM (Central Difference): Looks at the neighbors on both sides to find the slope. Simple, but physically blind and highly prone to numerical instability.
    fu[i] = -velocity * (u[i + 1] - u[i - 1]) / (2 * self.h)

  • Upwind: Dynamically checks the direction of the velocity (the "wind") and calculates the slope using only the pixel behind the current flow, preventing information from traveling backward against the current.
    If velocity > 0:
    fu[i] = -velocity * (u[i] - u[i - 1]) / self.h
    Else:
    fu[i] = -velocity * (u[i + 1] - u[i]) / self.h

2. Time Integration (ODE solvers)

Once the Method of Lines generates the system of ODEs, we must use a time-integrator to step the simulation forward.

  • Explicit Euler (1st Order): Calculates the slope at the current moment and steps forward blindly in a straight line.

    $$ k_1 = f(t, u^{old}) $$ $$ u^{new} = u^{old} + \Delta t \cdot k_1 $$

  • Runge-Kutta (2nd order): Instead of stepping blindly, RK2 takes a hypothetical, temporary step forward to see how the slope will change, averages that future slope with the current slope, and adjusts the true step accordingly.

    $$ k_1 = f(t, u^{old}) $$ $$ k_2 = f(t + \Delta t, u^{old} + \Delta t \cdot k_1) $$ $$ u^{new} = u^{old} + \Delta t \frac{k_1 + k_2}{2} $$

3. Fully Discrete Schemes (Coupled Space-Time)

To avoid the instability of central differences without relying on complex ODE solvers, there are schemes that abandon the Method of Lines, instead calculating the spatial step (\(\Delta x\)) and the time step (\(\Delta t\)) simultaneously.

  • Lax-Friedrichs (1st Order): Takes the unstable Central Difference and forcibly stabilizes it by adding an artificial diffusion term directly tied to the time step (\(\tau\)).
  • Lax-Wendroff (2nd Order): A higher-order method that successfully reduces diffusion, keeping wave fronts much sharper. However, it introduces dispersion, generating artificial mathematical oscillations (ripples) trailing behind sharp discontinuities.
  • Beam-Warming (2nd Order): A one-sided, upwind-biased alternative to Lax-Wendroff that also achieves 2nd-order accuracy, though it generates dispersive ripples ahead of the wave instead of behind it.

4. High-Resolution Methods