Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Erik Strand
nmm_2020_site
Commits
62a01ac5
Commit
62a01ac5
authored
Apr 29, 2020
by
Erik Strand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CT results
parent
d6d6661f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
0 deletions
+60
-0
_psets/09.md
_psets/09.md
+54
-0
_sass/main.scss
_sass/main.scss
+6
-0
assets/img/09_coral_50_no_tv.png
assets/img/09_coral_50_no_tv.png
+0
-0
assets/img/09_coral_50_tv.png
assets/img/09_coral_50_tv.png
+0
-0
assets/img/09_original_sinogram.jpg
assets/img/09_original_sinogram.jpg
+0
-0
assets/img/09_reconstruction_1.png
assets/img/09_reconstruction_1.png
+0
-0
No files found.
_psets/09.md
View file @
62a01ac5
...
...
@@ -165,3 +165,57 @@ samples:


## CT Reconstruction
Code lives
[
here
](
https://gitlab.cba.mit.edu/erik/funky_ct
)
.
Last year my
[
final project
](
http://fab.cba.mit.edu/classes/862.19/people/erik/project.html
)
for
[
The Physics of Information Technology
](
http://fab.cba.mit.edu/classes/862.19/index.html
)
dealt with
reconstruction of CT images. I explored the classic techniques like filtered back projection, then
started but didn't finish a compressed sensing based approach. Recently I revisited this and it
finally works.
For basic context, a computed tomography machine takes xray images of an object from a number of
different angles. No one of these gives an internal slice of the object; they're all projections.
But using the right mathematical techniques, it's possible to infer the interior structure of the
object.
Compressed sensing reconstruction, in broad strokes, works just like the DCT problem above, except
instead of using a DCT, one simulates taking the xray images. Let's work through the reconstruction
of a horizontal 2D slice. Each xray projection gives a 1D image, i.e. a row of pixel values.
Traditionally these are all stacked into a single image like this.

This is called a sinogram. Each row of pixels is a projection. Moving from top to bottom corresponds
to the rotation of the object. This particular sinogram was generated by CBA's CT machine. It's a
scan of a piece of coral. This is the raw data that we want to match; it's the equivalent of the
DCT coefficients from the previous problem.
The transform we need to implement then, is from a 2D image to its projections. That is, given an
image where each pixel represents the transmissivity of that region of space for xrays, we need to
generate the resulting sinogram. Essentially this boils down to an elementary ray tracing algorithm.
Once we have this, we can run an optimization algorithm that tunes the pixel values to produce the
correct sinogram. My implementation computes the loss gradient as well as the loss, so I can use
conjugate gradient descent (as implemented for the problem set before this one). A total variation
(TV) regularization term is applied, essentially summing the absolute value of the gradient of the
transmissivity at each pixel. This damps out noise, and encourages blocks of homogenous density as
are common in biological and mechanical samples.
On to the results. Using all the data, here's a reconstructed slice of coral.

{: #coral}
Surprisingly, so far I haven't found much of a difference with and without the TV term. Here I use
only 2% of the projections. With TV I get this:

{: #coral2}
And without:

{: #coral3}
Regardless, the construction quality is much poorer with the limited data.
_sass/main.scss
View file @
62a01ac5
...
...
@@ -34,6 +34,12 @@ img {
width
:
100%
;
}
img
#coral
,
img
#coral2
,
img
#coral3
{
width
:
79%
;
margin
:
auto
;
}
.captioned
{
font-style
:
italic
;
font-size
:
85%
;
...
...
assets/img/09_coral_50_no_tv.png
0 → 100644
View file @
62a01ac5
83.2 KB
assets/img/09_coral_50_tv.png
0 → 100644
View file @
62a01ac5
54.7 KB
assets/img/09_original_sinogram.jpg
0 → 100644
View file @
62a01ac5
76.8 KB
assets/img/09_reconstruction_1.png
0 → 100644
View file @
62a01ac5
69.4 KB
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment