The Algorithm That (Literally) Helps Doctors Save Thousands Of Patients Everyday
Heard about the Marching Cubes Algorithm?
Thousands of CT, MRI and SPECT scans are performed in hospitals daily.
These scans are crucial for detecting abnormalities in a sick patient that if left undetected will probably kill them.
Behind these scans is the backbone of an algorithm that was first published in 1987, but is not discussed much in popular literature.
Here’s a discussion about the Marching Cubes Algorithm, that makes modern medical imaging possible.
How Does Medical Imaging Work?
CT, MRI and SPECT scans are ways to obtain cross-sectional images of the human body.
These scans produce a series of 2D slices which are then interpreted by a radiologist.
Honestly, it is tough to visualise and make sense of the 3D anatomy of the human body by looking at these 2D slices.
This is especially true for patients with complex fractures involving the pelvis/ foot and with intracranial/ cardiac abnormalities.
3D visualisation is also needed when doctors plan surgical reconstructions and radiotherapy.
What Changed In 1987?
A research paper titled Marching Cubes: A High-Resolution 3D Surface Construction Algorithm was published in 1987.
This paper introduced a new algorithm called Marching Cubes, that helped computers create a 3D representation of the 2D scan data.
Let’s go through an intuitive example before we get into the nitty-gritty of the algorithm.
Imagine that we have an imaginary sculpture hiding inside a huge block of marble and we want to expose it.
We first divide the marble block into tiny cubes.
Each cube’s corner is labelled by a number. This number tells how close the cube is to the hidden sculpture.
For a cube, if all the corners have very large numbers, then this cube is probably inside the sculpture. On the other hand, if the numbers are very small, the cube is outside the sculpture.
But, if there are mixed high and low numbers, then the sculpture is passing through this cube. Such cubes are what we are interested in!
For such cubes, we try to draw lines between their corners where we think the surface of the sculpture is.
Next, we connect these lines to form triangles using specific rules that are based on different ways the sculpture can pass through a cube.
Putting these triangles together leads to forming the complete surface of the sculpture!
How Marching Cubes Algorithm Works?
Keep reading with a 7-day free trial
Subscribe to Into AI to keep reading this post and get 7 days of free access to the full post archives.