Generation of heart (or other tissue) models from medical images requires several steps. In particular, masking and cleanup, segmentation, and meshing. Masking and cleanup of image stacks is easily done with something like ImageJ. Be warned — if you are using large images, it will require a lot of memory. Once some basic cleanup of the images, cropping, and masking has been done, it’s necessary to segment the interesting things from the non-interesting things, and to separate out various regions of interest. For example, when segmenting an MRI scan of a heart, first the MRI chamber (if included in the images) is masked out. Then unnecessary bits of the surrounding bath are cropped out. Adjustment of the brightness and contrast levels of the images might be necessary. Once that’s done, one wants to separate the heart from the bath, and maybe infarcted tissue from healthy tissue.
I spent quite some time trying to figure out a practical way to do this segmentation for my last project as a graduate student. I settled on using Seg3D from SCI. Seg3D has a great 4-panel 3D interface (3 views + 3D rendering), and a number of built-in segmentation tools. In fact, when I looked it it today, it seemed to have had even more added to it than it had a year or two ago. I’ll write something about those old and new features later.
For now, if you want to get Seg3D up and running on a Windows or Mac machine, you’re set — just go download the appropriate package from the Seg3D download page. If you’re running Linux, however, you’ll have to compile it yourself. That’s probably for the best anyway — it’ll help ensure that it runs as efficiently as possible on your machine.
The instructions on the Seg3D site are pretty good, but I’ll add one thing that tripped me up today. If you’re using the proprietary nVidia drivers in Ubuntu, and you’re using Ubuntu’s distribution of them (if you clicked a menu to switch to the drivers, you probably are), you have to install the -dev
driver package to get the appropriate OpenGL libraries.
But maybe I’m getting ahead of myself. Do you have an nVidia card? If you don’t know, try:
lspci | grep -i nvidia
If you get something like this, you’re all set:
01:00.0 VGA compatible controller: nVidia Corporation G96 [GeForce 9500 GT] (rev a1)
If you get nothing, you don’t have an nVidia card. To find out if you already have the drivers installed, try:
dpkg --get-selections | grep -i nvidia
If you see something like nvidia-glx-185
, you’ve got the driver installed, and if you see something like nvidia-glx-185-dev
, then you’re good to go. You can carry on from the Seg3D compilation instructions. If you see the first, but not the second, given the highest number from the first (in this case 185), do:
sudo apt-get install nvidia-glx-185-dev
Hopefully it’ll install, and then you’re all set for drivers. You can carry on and install using the Seg3D instructions.
I’ll have some posts later about using Seg3D to turn your images into a segmented stack, ready for meshing with Tarantula.
The resolution within SEG3D appears (very noticeably) different from that seen when the same slides are opened with other programs, such as Volume Viewer. Does this program automatically downsize the sample while importing the slides?
Thanks!
A new version of Seg3D (2.0) was recently released by the SCI Institute. Follow the link for more info (http://sci.utah.edu/cibc/news/426-seg3d2-release.html)
I work on the Seg3D2 team and I’m glad to hear you are having success with it. The new version is designed by a completely different team, and is a rewrite from the ground up. Our new version has 6 viewers any of which can be either 3D or 2D views. Also, we’ve added a lot of new filters that can really help with segmentation and have more in the pipeline.
Thanks for mentioning Seg3D!