Creating a 3D Model of the Skull from CT Scans

I’m currently working on visualizing clinical computed tomography (CT) scans. CT scans are great for providing quick and inexpensive information about the inside of someone’s head. This is especially useful when someone comes to the emergency room with any sort of head trauma. However, CT scans of the head are typically a less versatile source of information than MRI scans (particularly when using computational methods). This is mostly due to the decreased spatial specificity of the brain in CT scans.
I obtained the following CT scan of a spinal segment here. This just demonstrates how easy it actually is to make a 3D model of something.
library(ANTsR)
library(rgl)
library(misc3d)
library(grid)
library(png)
ct1 <- antsImageRead('Desktop/CT/test/c1_0001.nii.gz')
renderSurfaceFunction(list(ct1))
Not only was it pretty easy to do this, but it also created a pretty good picture. The renderSurfaceFunction command actually creates a 3D model that I can click on and move around. (Here I’m using the rgl.snaphsot() command to save pictures of the 3d model I produce as .png files.)
It gets a bit more tricky when looking at a CT scan of the head.
ct2 <- antsImageRead('Desktop/CT/test/patient_001_ct.nii.gz.nii')
renderSurfaceFunction(list(ct2))
There are several approaches I can take here. Probably the most elegent strategy is to use templates provided here to segment out different parts of the scan. This would just involve running a script similar to what I’ve previously demonstrated, but using CT scans. You could also run a joint label fusion. Here I just use a kmeans segmentation to look at different parts of the image. I find that the third segment is the best for looking at the skull.
ct2seg <- kmeansSegmentation(ct2)
renderSurfaceFunction(list(ct2seg$probabilityimages[[3]]))
However, this is pretty pixelated and has some stuff sticking off of the skull that probably isn’t bone, so I do a little more processing to get what I want.
skull <- antsImageClone(ct2seg$probabilityimages[[3]])
skull <- iMath(skull, "GetLargestComponent")
skull <- iMath(skull, "FillHoles")
renderSurfaceFunction(list(skull),smoothsval = 2)
And there you have it. That’s about 5 minutes to make a decent looking 3D model of the skull from a CT scan. If you’re planning on doing any advanced analyses on it you’d probably be better off doing a more robust segmentation, but for a simple presentation this is a pretty quick and easy way of getting what you need. Because the renderSurfaceFunction command creates an interactive 3D model this can also be a good way of investigating an interesting case from different views.
Citations
CT image - Case courtesy of Dr Dalia Ibrahim, Radiopaedia.org. From the case rID: 44049
MRI image - Case courtesy of Dr Bruno Di Muzio, Radiopaedia.org. From the case rID: 39310
Brain CT - Michael Fitzpatrick, scanhttp://hdl.handle.net/1926/426
Spinal CT scan - “The image datasets used in this experiment were from the Laboratory of Human Anatomy and Embryology, University of Brussels (ULB), Belgium”

Comments

Popular posts from this blog

Making a Brain Template

Preparing for the MCAT

Align and Bias Correct Your Brain!