Skip to content
Snippets Groups Projects
Select Git revision
  • bb5e8a7776448c2c23d58b6548abf49f3effb68f
  • master default protected
2 results

cudampipi.cu

Blame
  • project.md 9.35 KiB
    title: Final Project

    Computed Tomography

    Background

    Introduction

    Computed Tomography (CT) is used to turn 2d projections of a 3d shape like these (TODO insert image)

    into a 3d model like this (TODO insert image).

    This is pretty cool. In particular, voxels in the computed model can tell you the density at specific locations inside the scanned object, whereas pixels in the projections can only tell you the average density along lines that pass through the object. So we're getting a lot more out of those 2d images than meets the eye.

    How does it work? That's what I'd like to understand. In particular, I hope to clearly explain the basic principles of CT, use them to implement a basic reconstruction from scratch, and experiment with existing solutions to get a sense of the state of the art.

    I'm going to describe the algorithms in 2d, since it will make everything simpler. In this case we have an image like this (TODO insert image), and we'd like to reconstruct it only knowing its 1d projections at different angles.

    Fourier Reconstruction

    Fourier Slice Theorem

    Let f : \mathbb{R}^2 \rightarrow \mathbb{R} be a density function. If we map density to brightness we can view f as describing an image. We'll assume that this function is defined everywhere, but is always zero outside some finite neighborhood of the origin (say, the bounds of the image).

    The projection of f to the x axis is obtained by integrating along y:

    p(x) = \int_\mathbb{R} f(x, y) dy

    Meanwhile, the Fourier transform of f is

    \hat{f}(u, v) = \int_\mathbb{R} \int_\mathbb{R} f(x, y) e^{-2 \pi i (u x + v y)} dx dy

    Now comes the key insight. The slice along the u axis in frequency space is

    \begin{align*} \hat{f}(u, 0) &= \int_\mathbb{R} \int_\mathbb{R} f(x, y) e^{-2 \pi i u x} dx dy \\ &= \int_\mathbb{R} \left( \int_\mathbb{R} f(x, y) dy \right) e^{-2 \pi i u x} dx \\ &= \int_\mathbb{R} p(x) e^{-2 \pi i u x} dx \\ &= \hat{p}(u) \end{align*}

    So the Fourier transform of the 1d projection is a 1d slice through the 2d Fourier transform of the image. This result is known as the Fourier Slice Theorem, and is the foundation of most reconstruction techniques.