Woman Skin and Bone

Make Your Own Visible Woman

The National Library of Medicine Visible Human project provides XRAY Computed Tomography (CT), Magnetic Resonance Imaging (MRI) and physical cross-sectional data.

This paper describes how to use the Visualization Toolkit to create surface models of the bone and skin from the Visible Woman's CT data. This is a continuation of the work that was done with proprietary software described in Marching Through The Visible Woman.

This document orresponds to vtk release 2.0. The vtk1.3 document is also available.

---------------

Contents:

- Introduction
- Getting the Data
- Getting the Software
- Getting the Scripts
- Creating Models
- Displaying Models
- Results

---------------

Introduction

In 1989, the National Library of Medicine (NLM) began an ambitious project to create a digital atlas of the human anatomy. The NLM Planning Panel on Electronic Image Libraries [1] recommended a project to create XRAY Computed Tomography (XRAY-CT), Magnetic Resonance Imaging (MRI) and physical sections of a human cadaver. The project is called "The Visible Man." Another cadaver, that of a 59 year-old woman, "The Visible Woman", was released in the Fall of 1995.

Over the past two years we have done a number of experiments with both the male and female Visible Human data. These experiments were done with proprietary software that we have used for the past 12 years. Two years ago, Will Schroeder, Ken Martin and Bill Lorensen began to write a textbook on visualization. The book, "The Visualization Toolkit; An Object_Oriented Approach to 3D Graphics", is now available from Prentice Hall. The book includes a C++ Class Library implementing the visualization algorithms described in the book.

In this paper, we show how to use VTK to create skin and bone models from the Visible Woman's CT data. The paper shows how to construct a VTK pipeline and what parameter values to set for various components of the pipeline.

---------------

Getting The Data

First you must obtain the CT data. Internet access is available to users who sign a license agreement with the NLM. The data is stored one slice per file and the files have been compressed using the unix compress program. Uncompressed, each slice is 512 x 512 x 16 bits with a 3416 byte header. The format of the headers is General Electric Genesis described in the Medical Image Format FAQ. The image header contains among other things the table position and field of view. These are important quantities when working with this data since the spacing between the slices and the pixel size changes several times throughout the data set. The slices are named as follows: c_vfxxxx.fre where xxxx is the location in mm's of the slice. There are 1734 slices in the fresh CT data set using about 480 megabytes of disk storage (compressed).

This paper assumes that the headers have been stripped from the slice files and have a slice prefix slice. The slices are renumbered, starting at 1.

On a Unix system, these files can be converted into files without headers with the following script:

#!/bin/csh
set n = 1001
set m = 1
while ($n <= 2734)
zcat c_vf$n.fre.Z | dd ibs=3416 skip=1 | compress - >slice.$m.Z
@ n = $n + 1
@ m = $m + 1
end

---------------

Getting The Software

Next you need to get the software. To run the examples described below, you'll need version 2.0 of VTK. See How Do I Get the Software at the VTK web site.

---------------

Getting The Scripts

We created several tcl scripts to process the slice data into models and render the models. You need to download each of them from the scripts directory. If you are using Netscape, you can hold the right mouse button down over the hyper text. The scripts are:
  1. march.tcl
    Creates a vtk pipeline to read the slices, create a surface model and write the model to a file. Look here for a detailed description of the tcl script.
  2. SliceOrder.tcl
    Creates permutation matrices. This script is used by march.tcl.
  3. renactors.tcl
    Renders models created by march.tcl. Look here for a detailed description of the tcl script.
  4. colors.tcl
    Defines colors. This script is distributed with vtk and resides in the vtk/examples/tcl directory.
  5. vtkInt.tcl
    Defines the vtk tcl interactor interface. This script is distributed with vtk and resides in the vtk/examples/tcl directory.
  6. bone*.tcl and skin*.tcl
    A tar file holds a separate tcl script for each skin and bone section. The rationale for breaking the study into section is is given in Marching Through The Visible Woman. The section breakdown by slice range is:

    Slice Ranges
    Section Slice Range
    0 1-209
    1 210-227
    2 228-249
    3.1 250-450
    3.2 450-650
    3.3 650-850
    3.4 850-985
    3.5 986-1106
    4 1107-1110
    5 1111-1117
    6.1 1118-1318
    6.2 1318-1518
    6.3 1518-1734

---------------

Creating Models

With the data, software and scripts in hand, you can begin making models. We have created a parameterized tcl script march.tcl to do the processing. Because of the size of the Visible Woman data and varying slice resolution, we have broken the data into several sections. There are tcl scripts for each skin and bone section. For example, the script skin0.tcl covers slices 1 through 209 and bone61.tcl covers slices 1118 through 1318. The first statement reads the bone.tcl script that defines parameters common to the bone throughout the visible woman's CT data.
Here is bone.tcl:
set SAMPLE_RATE "1 1 1"
set SLICE_ORDER si
set RESOLUTION 512
set STUDY ../slices/slice
set SPACING 1
set VALUE 1224.5
set DECIMATE_ITERATIONS 5
set DECIMATE_ERROR 0
set DECIMATE_ERROR_INCREMENT .0002
set SMOOTH_ITERATIONS 0
set SMOOTH_FACTOR .01
set FEATURE_ANGLE 60
The last statement in each of these scripts reads the march.tcl script.
Here is bone61.tcl:
source bone.tcl

set NAME bone61
set PIXEL_SIZE .72265625 
set START_SLICE 1118
set END_SLICE 1318
set VOI "0 511 0 425 $START_SLICE $END_SLICE"

source march.tcl
To run the script, type:
vtk bone61.tcl

The following parameters can be specified.

Required Parameters for All Studies:

NAME
is the name of the part to be generated. Choose a name that makes sense to you. In medical applications, the NAME might be skull, tumor, or face. A file NAME.vtk will be created once the script runs successfully. For example, running:
vtk bone61.tcl
will create a file bone61.vtk.
RESOLUTION
is the in-plane resolution in pixels. For the Visible Human CT data this is 512.
STUDY
is the path name of the file prefix of each slice in your study. We keep the Visible Woman data slices in a separate directory, ../slices. After running the uncompress script above, the slice prefix for the woman is slice.
END_SLICE
is the ending slice number.
VALUE
is the density value of the isosurface. We consistently use 600.5 for skin, and 1200.5 for bone. Why the .5 on each of these values? This avoids generation of non-manifold surfaces. Using an integer VALUE, a triangle could meet another triangle at a vertex and not share an edge if the isosurface value corresponded exactly to a cube value. (If you don't know what we're talking about here, you better read the book.) The .5 offset avoids this problem.

Optional Parameters:

The script provides reasonable defaults for the following parameters. You can change the defaults by editing the march.tcl script.
START_SLICE (default 1)
is the starting slice number.
SLICE_ORDER (default si)
is the order of slice acquisition defined by a 2 character mneumonic. si (top to bottom), is (bottom to top), ap (front to back), pa (back to front), lr (left to right) and rl (right to left). The Visible Human slices were acquired from top to bottom.
BYTE_ORDER (default BigEndian)
will swap bytes if the byte ordering of your machine does not match the byte order of the data file. The Visible Human data is BigEndian.
HEADER_SIZE (default 0)
is the size of the header that will be skipped to reach the pixel data. Since we've already stripped the headers, the HEADER_SIZE is 0 for the Visible Human data. If you prefer to keep the files in their original format, then HEADER_SIZE should be 3416.
PIXEL_SIZE (default 1.0)
is the size of a pixel in whatever units you desire. This varies throughout the Visible Human data.
SPACING (default 1.0)
is the distance in your units between each slice. For the Visible Woman, the SPACING is 1 mm throughout the study. It varies for the man. See Marching Through The Visible Man for details on slice spacing for the male data.
VOI (default 0,RESOLUTION-1,0,RESOLUTION-1,START_SLICE,END_SLICE)
is the volume of interest. This defines a subset of the volume to be processed.
FEATURE_ANGLE (default 60)
is the feature angle for normal generation.
DECIMATE_ANGLE (default FEATURE_ANGLE)
is the angle that defines features for decimation.
DECIMATE_ITERATIONS (default 1)
is number of decimation iterations.
DECIMATE_ERROR (default .0002)
is initial error tolerance for decimation.
DECIMATE_ERROR_INCREMENT (default .0002)
is error tolerance increment for decimation.
SMOOTH_ANGLE (default DECIMATE_ANGLE)
is the angle that defines features for smoothing.
SMOOTH_ITERATIONS (default 10)
is number of smoothing iterations.
SMOOTH_FACTOR (default .01)
is the relaxation factor for smoothing.

---------------

Displaying Models

The tcl script renactors.tcl will render the models created above. For each generated part, add a line:
$ren1 AddActor [eval MakeActor partName color]
where partName is the NAME of the generated part
and color is the red, green and blue color component.

Then just enter:

vtk renactors.tcl
and enjoy.

Look here for a detailed description of the tcl script.

---------------

Results

We ran the scripts: skin0.tcl - skin63.tcl and bone0.tcl - bone63.tcl on a Silicon Graphics System.

Except for changes in NAME, PIXEL_SIZE START_SLICE, END_SLICE and VALUE the following parameters were used:

set SAMPLE_RATE 4 4 4
set SLICE_ORDER si
set RESOLUTION 512
set STUDY ../slices/slice
set SPACING 1
set ZMAX [expr $END_SLICE - $START_SLICE]
set VALUE 600.5 for skin
set VALUE 1200.5 for bone
set DECIMATE_ITERATIONS 20
set DECIMATE_ERROR .0002
set DECIMATE_ERROR_INCREMENT .0002
set SMOOTH_ITERATIONS 10
set SMOOTH_EXPAND -.34
set SMOOTH_SHRINK .33
set FEATURE_ANGLE 60

The SGI hinv command reported:

2 190 MHZ IP25 Processors
CPU: MIPS R10000 Processor Chip Revision: 2.4
FPU: MIPS R10010 Floating Point Chip Revision: 0.0
Secondary unified instruction/data cache size: 1 Mbyte
Data cache size: 32 Kbytes
Instruction cache size: 32 Kbytes
Main memory size: 512 Mbytes, 2-way interleaved
Graphics board: InfiniteReality
Only one processor was used. All reported times are in wall clock seconds. The following table summarizes the results. Your mileage may vary.

Summary of Visible Woman Skin Surface Extraction, Sample Rate 4 4 4
Section Read Extract Marching Decimate Smooth Transform Normals Stripper Write
skin0 37.16 0.83 78188 polygons 1.53 25359 polygons 25.37 1.80 0.06 1.72 0.28 0.19
skin1 3.03 0.07 7784 polygons 0.14 3271 polygons 1.56 0.37 0.00 0.15 0.02 0.02
skin2 3.62 0.08 7220 polygons 0.13 2855 polygons 1.43 0.33 0.00 0.13 0.02 0.01
skin31 28.62 0.47 97106 polygons 2.16 51321 polygons 20.62 8.35 0.02 2.89 0.61 0.16
skin32 34.68 0.70 63730 polygons 1.20 24381 polygons 13.00 3.77 0.01 1.32 0.26 0.08
skin33 33.43 0.75 73950 polygons 1.45 29446 polygons 15.25 4.61 0.01 1.59 0.33 0.14
skin34 22.37 0.50 35050 polygons 0.66 13673 polygons 7.16 1.91 0.00 0.71 0.13 0.05
skin35 19.77 0.42 26702 polygons 0.49 11158 polygons 5.64 1.47 0.00 0.57 0.11 0.04
skin4 0.08 0.02 964 polygons 0.03 391 polygons 0.16 0.01 0.00 0.01 0.00 0.02
skin5 1.20 0.02 750 polygons 0.02 334 polygons 0.13 0.01 0.00 0.01 0.00 0.00
skin61 35.06 0.79 43656 polygons 0.84 16789 polygons 9.24 2.44 0.00 0.91 0.17 0.07
skin62 34.04 0.78 31450 polygons 0.65 12840 polygons 6.60 1.77 0.00 0.67 0.11 0.04
skin63 30.20 0.85 36514 polygons 0.74 12030 polygons 12.40 0.75 0.00 0.64 0.11 0.05

Summary of Visible Woman Bone Surface Extraction, Sample Rate 4 4 4
Section Read Extract Marching Decimate Smooth Transform Normals Stripper Write
bone0 37.99 0.83 122758 polygons 2.52 52969 polygons 45.25 3.91 0.02 3.02 0.63 0.21
bone1 2.80 0.07 2020 polygons 0.05 1621 polygons 0.45 0.08 0.00 0.07 0.01 0.01
bone2 3.84 0.08 3704 polygons 0.07 2750 polygons 0.78 0.15 0.00 0.13 0.02 0.02
bone31 33.28 0.59 76292 polygons 1.50 54736 polygons 16.95 3.83 0.02 2.91 0.61 0.25
bone32 34.28 0.70 81982 polygons 1.58 54849 polygons 18.01 3.94 0.02 3.03 0.63 0.25
bone33 33.32 0.70 72320 polygons 1.35 50118 polygons 16.38 3.49 0.02 2.76 0.58 0.17
bone34 22.90 0.46 23386 polygons 0.43 15797 polygons 5.15 0.98 0.00 0.84 0.16 0.06
bone35 19.80 0.42 5814 polygons 0.20 3032 polygons 1.24 0.17 0.00 0.14 0.02 0.01
bone4 0.73 0.03 280 polygons 0.01 131 polygons 0.05 0.00 0.00 0.00 0.00 0.09
bone5 1.20 0.03 216 polygons 0.01 145 polygons 0.04 0.00 0.00 0.00 0.00 0.01
bone61 35.08 0.77 46832 polygons 0.87 31333 polygons 10.70 2.15 0.01 1.72 0.33 0.13
bone62 33.64 0.82 16246 polygons 0.67 9227 polygons 3.70 0.55 0.02 0.54 0.08 0.09
bone63 30.54 0.81 42952 polygons 0.81 30164 polygons 9.89 2.06 0.01 1.64 0.31 0.12

---------------

Effects of Sample Rate

Compare Sample rates

The SAMPLE_RATE has an impact on processing time and quality. This table show the progression from a SAMPLE_RATE of 1,1,1 to 8,8,8.

Sample Rate Changes
Image Sample Rate 1 1 1 Sample Rate 2 2 2 Sample Rate 4 4 4 Sample Rate 8 8 8
Sample rate 1 1 1 2 2 2 4 4 4 8 8 8
Triangles 1429849 341186 78188 17602
After Decimation 155156 66232 25359 8374

---------------

Questions / Comments

James Miller (millerjv@crd.ge.com)

Last Updated:

GE Home Page | GE Global Research