Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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

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: enter image description here

share|improve this answer

ParaView - also use ImageJ 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.

share|improve this answer

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!

share|improve this answer

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.

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.