# Tools for visualizing large 3D volumes

I have a sequence of 2D images (png files) encoding the partitioning (segmentation) of a large biological 3D volume. In these files, each pixel has a color, representing the 3D object the pixel belongs to.

I was wondering if anybody knew of tools that I can use, hopefully off-the-shelf, to visualize this data in 3D.

I am mostly interested in tools that are free, or free-to-use in academia.

We can make this community wiki if you wish.

-

You can use VisIt to perform this visualization. According to the VisIt FAQ:

VisIt can read in many image file formats created by popular image editing software including: BMP, JPEG, PNG, PPM, PNM, RGB, TIFF. Stacks of images can also be assembled into 3D volumes using a .imgvol file, which is a text file containing the names of the files to assemble into the 3D volume.

As an example, I created 20 slices of a paraboloid and output each slice into a PNG file. I then created imagelist.imgvol that contains:

Z_START: 0.0
Z_STEP: 5
test1.png
test2.png
test3.png
test4.png
test5.png
test6.png
test7.png
test8.png
test9.png
test10.png
test11.png
test12.png
test13.png
test14.png
test15.png
test16.png
test17.png
test18.png
test19.png
test20.png


Notice that I used Z_STEP to rescale the z-axis. Then I opened the imgvol file in VisIt, and clicked Add -> Contour -> Intensity. This results in the following image:

-

ParaView www.paraview.org - also use ImageJ http://fiji.sc/wiki/index.php/Fiji if you need to manipulate the data into something ParaView likes (e.g. raw).

I'd load the stack into ImageJ (it also has 3D viewers - so give them a try), then save it as a raw naming the file with x_y_z_datasize (e.g. my_file_1000x1000x20_8bit.raw).

Then load the raw in ParaView using extents of 0-999, 0-999, 0-19 and play about with endiness and data size untill you get something that looks good. A tip is start with slices and then progress to volume.

Check out the ParaView wiki for more detail.

-

I would strongly reccomend Python + Mayavi! It is cross-platform, fast, powerful, and easy! Here is a surface plot of in 7 lines of code, including loading files!

from scipy import array, misc
from mayavi import mlab

directory = "some-data"
data = array([misc.imread(os.path.join(directory, f)) for f in os.listdir(directory)])

unique_colors = set(list(data))
for color in unique_colors:
mlab.comtour3d(1.*(data==color), contours=[0.5])


This will give you an interactable GUI with configurable meshes of your data. There is nearly infinite room for customization either by hand or programatically!

-

I highly recommend ImageJ. It is a great freeware software for visualizing tomographic data or image sequences in any format. It has tons of pluggins for specialized image processing, such as segmentation, object counting, 3D reconstruction, thresholding, etc.

-
I liked ImageJ a lot when I was new to scientific computing, but felt really limited by it inability to support complex scripting tasks. It is probably a really good starting point though. – meawoppl Feb 27 '12 at 3:41