|
Using VTK to produce volume renderings
The Visualization Toolkit
(VTK) is a freely available visualization system,available on a variety
of UNIX workstations and PC's running Microsoft Windows 95, 98 or NT.
This document gives some basic instructions for using VTK to produce volume
renderings, like those shown by the EmbryoView program.
All the instructions which follow assume that you are using a UNIX workstation
on which you have a recent version of VTK (at least VTK 2.2)
installed, that you are familiar with basic UNIX commands and that you
can run MAPaint. MAPaint, WlzExtFFConvert and the vtk scripts mentioned
below can be downloaded from the Human Genetics Unit anonymous ftp
server.
File Formats
The domains and reference image on this CD are stored using the native file
format of our image processing system, Woolz, a format not understood by
VTK. There are two programs provided which can be used to convert these
Woolz format images into other formats, such as the SLC file format which
can be read by VTK.
| WlzExtFFConvert |
will copy files between several formats including
Woolz and SLC |
| MAPaint  |
can write reference or painted images to a variety
of formats including SLC |
To produce a volume rendering of the reference image
Create an SLC file from the reference image on this CD using MAPaint:
- Start the MAPaint program and load the ts14 reference image (read
the mini-manual for help).
- From the MAPaint file menu select File->Write reference.
- Using the "Select" image type option choose "slc".
- Enter a filename in the "Selection" window, eg ts14.slc.
- Confirm using the "OK" button.
Make a volume rendering of this SLC reference image using VTK:
- Execute the example tcl script using the vtk executable installed
on your workstation eg: vtk VolRenderGrey.tcl ts14.slc.
- It will take some time to read and render the image, after which
it should be possible to rotate the viewpoint around the embryo by draging
with the left mouse button.
- The size of the volume rendering can be increased by simply resizing
the window within which it is displayed. But, it can take a long time
to render into a large window.
To produce a volume rendering the reference image together with painted
domains
Create an SLC file with painted domains:
- Start the MAPaint program.
- Within MAPaint select a domain, Domain->Select.
- Within MAPaint select an anatomy domain, Anatomy->....
- Repeat these two selection steps until you have the anatomy domains
that you want to visualise.
- Write the painted volume to a file, "Domain->Write painted volume".
- Using the "Select" image type option choose "slc".
- Enter a filename in the "Selection" window, eg ts14painted.slc.
- Confirm using the "OK" button.
Make a volume rendering of this SLC painted volume using VTK:
- Execute the example tcl script using the vtk executable installed
on your workstation: vtk VolRenderColour.tcl 1 ts14painted.slc.
- After a short while it should be possible to manipulate the rendered
image.
The tcl script VolRenderColour.tcl can be used to render upto 5 domains.
|