Progressive Isosurface Compression Application: Instructions
Creating a volume data for this version
Volume data can come from various 3D scanning, scientific simulations, or distance transformation from 3D meshes; You may need to preprocess your volume data for this version. We used .iso as an extension for the input volume data which
has scalar values (floating-point type) on a regular 3D grid, ranging from -1 to 1. The isovalue is defined as being 0. If the given volume is not defined on a regular grid with power-of-two size (2^n + 1), virtual padding (i.e., fill up -1 for empty space) should be applied.
Preprocess raw volume data or sets of 2D image files to a binary output file with an extension .iso in the following order:
for (i = 0; i < resolution; i++)
Opening a volume data and extracting an isosurface
for (j = 0; j < resolution; j++)
for (k = 0; k < resolution; k++)
fwrite(&scalar, sizeof(float), 1, output);
Drag & drop one .iso file, e.g. eight257.iso;
Specify unit sizes for the grid;
The default unit size is 1 for x,y, and z (1*1*1);
For Headscan, try 0.8 for x,y and 1.5 for z
For Bonsai, 0.59 for x,y and 1 for z (0.59*0.59*1);
For mrihead, 0.02 for x,y and 0.015 for z (0.02*0.02*0.015).
And check the box if you like to save binary octree with geometry for faster reading later.
Drag & drop one bbm file for reading a previously extracted isosurface, e.g. eight257.bbm, then eight257.con and eight257.geo will automatically be read;
Choose a viewpoint (use the mouse):
left button: x/y
right button: z translation;
both: rotation (press
'ctrl+s' to switch the rotation axis).
The isosurface Eight from a volume in a 257*257*257 grid.
Press Ctrl+D, then the following dialog
Once the options are chosen, press the
File name: Give an output file name (i.e., e8) then 4 output files (i.e., e8_header.txt, e8.sign, e8.leaf, e8.geo) will be generated;The output files are separated to show the size of compressed sign bitstream, leaf bitstream and geometry bitstream. Those files can be intertwined into a single file, obviously.
Geometry encoding option:The default encodes geometry. Click the box "No Geometry" if no geometry encoding is wanted;
Geo. Quantization Enter number of bins for quantizing localized coordinates. Usually 8~10 for x,y and 18~20 for z. For Temple model, try 30~40 for x,y and 60~80 for z;
In the above example of result for Eight, bitrates as bit per vertex(b/v), compressed
file sizes for sign bitstream, leaf bitstream, geometry bitstream and the total as byte are shown. To show bytes transferred progressively, connectivity bits (sign + leaf) upto octree level 8 (i.e., 257*257*257 grid) are listed.
Press Ctrl-Shift-D with a window open to decode progressively;
Open or drag & drop a *_header.txt" in the background without a window to just decode in full. *.sign, *.leaf, and *.geo will read in automatically.;
Give the same name you specified during encoding. e.g. e8 in
the current example. Then e8_header.txt, e8.sign, e8.leaf, and e8.geo will be read in.;
Press "OK" to decode.;
Visual debugging: displays intermediate
levels of details at each level and/or at the rate of given number of polygons generated;
Delay: in ms, between each update.
May be useful to simulate the delay in transmission.
Here is examples of decoding Buddha and Bonsai in 257*257*257 grids.