Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
pit
Commits
d6628e55
Commit
d6628e55
authored
6 years ago
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Flesh out CT theoretical discussion
parent
74ef26e0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
project.md
+54
-6
54 additions, 6 deletions
project.md
with
54 additions
and
6 deletions
project.md
+
54
−
6
View file @
d6628e55
...
@@ -2,17 +2,41 @@
...
@@ -2,17 +2,41 @@
title
:
Final Project
title
:
Final Project
---
---
# CT Imaging from Scratch
# Computed Tomography
## Background
## Background
-
[
Radon Transform
](
http://www-math.mit.edu/~helgason/Radonbook.pdf
)
by Sigurdur Helgason
-
[
Radon Transform
](
http://www-math.mit.edu/~helgason/Radonbook.pdf
)
by Sigurdur Helgason
## 2d Reconstruction
In two dimensions, the theory of image reconstruction from projections is pretty simple. Assume some
## Introduction
density function $$f :
\m
athbb{R}^2
\r
ightarrow
\m
athbb{R}$$ (with compact support). The projection
of this density function to the x axis is
Computed Tomography (CT) can 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 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.
## Theory
Let's start 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.
We can describe the image as a density function $$f :
\m
athbb{R}^2
\r
ightarrow
\m
athbb{R}$$. Think
of $$f(x, y)$$ as the brightness of the image at $$(x, y)$$. We'll assume that this function is
defined everywhere, but is always zero outside our image.
The projection of this density function to the x axis is obtained by integrating along y:
$$
$$
p(x) =
\i
nt_
\m
athbb{R} f(x, y) dy
p(x) =
\i
nt_
\m
athbb{R} f(x, y) dy
...
@@ -25,7 +49,7 @@ $$
...
@@ -25,7 +49,7 @@ $$
=
\i
nt_
\m
athbb{R}
\i
nt_
\m
athbb{R} f(x, y) e^{-2
\p
i i (u x + v y)} dx dy
=
\i
nt_
\m
athbb{R}
\i
nt_
\m
athbb{R} f(x, y) e^{-2
\p
i i (u x + v y)} dx dy
$$
$$
No
te that t
he slice along the $$u$$ axis in frequency space is
described by
No
w comes the key insight. T
he slice along the $$u$$ axis in frequency space is
$$
$$
\b
egin{align
*
}
\b
egin{align
*
}
...
@@ -36,3 +60,27 @@ $$
...
@@ -36,3 +60,27 @@ $$
&=
\h
at{p}(u)
&=
\h
at{p}(u)
\e
nd{align
*
}
\e
nd{align
*
}
$$
$$
So the Fourier transform of the 1d projection is a 1d slice through the 2d Fourier transform of the
image. Since the x axis is arbitrary (we can rotate the image however we want), this works for other
angles as well. That is, if you take the projection onto the line that makes an angle $$
\t
heta$$
with the x axis, its Fourier transform is equal to the slice along the same line in frequency space.
Conceptually this tells us everything we need to know about the reconstruction. First we take the
Fourier transform of each projection individually. Then we combine them by arranging them radially.
Finally we take the inverse Fourier transform of the resulting 2d function. We'll end up with the
image.
It also tells us how to generate the projections, given that we don't have a 1d x-ray machine. First
we take the Fourier transform of the image. Then we extract radial slices from it. Finally we take
the inverse Fourier transform of each slice. These are the projections. This will come in handy for
generating testing data.
## Discretization
Of course the clean math of the theory has be modified a bit to make room for reality. First of all,
our projections will be represented as discrete pixels, not perfect functions. So we'll want our
Fourier transforms to be DFTs. And when we combine the transforms of the projections, we won't
naturally end up with a nice 2d grid of values on which to perform an inverse DFT. So we'll have to
interpolate.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment