Skeletonization Software for Binary Voxel Shapes
Our "Skeleton Sandbox" application allows you to compute multiscale curve- and surface-skeletons of binary voxel shapes, and inspect and store the results for later use. A compiled version is available for Microsoft Windows (32 bit). It was tested under Windows XP on a Pentium IV 3 GHz with 1GB of RAM. Source code is not available. This software implements our technique described in:
D. Reniers, J.J. van Wijk, A. Telea. Computing Multiscale Curve and Surface Skeletons of Genus 0 Shapes Using a Global Importance Measure, IEEE Transactions on Visualization and Computer Graphics, March/April 2008, Vol. 14, No. 2, pp. 355-368.
If you use our software for your research, please cite the paper.
- July 9, 2008: export to VTK file format added. Select the layer you wish to export and choose "File -> Export to VTK" from the menu.
- Download the executable and extract
- Download the necessary DLLs here and extract
- Copy gzip.exe to a directory in the system path, "c:\Windows\System32" for example.
- Run "ss.exe". You need OpenGL support and a three button mouse. All required DLLs are bundled with the executable.
- Next, you have two options: open a previously computed and stored skeleton, or compute a new skeleton. We recommend opening a previously computed skeleton first to get accustomed with the software.
Opening a previously computed skeleton
- Download one of the previously computed skeletons, and (optionally) the original mesh (you don't need to unzip the files if you copied gzip to your system path):
- Open the downloaded file by choosing "File -> Open previously computed skeleton" from the application's menu bar.
- The original mesh file, which was voxelized, is automatically opened if located in the same directory. If it is not automatically openend, you can open it using "File -> Open mesh".
After opening a skeleton file (.skel or .cskel), you see something like this:
On the left is an OpenGL window that displays the voxels of the selected layers and the transparent mesh of the original shape, if available. Each layer contains one field of a single type (e.g. integer, float, or indexed voxels). The available layers are shown in the right frame. Layer visibility is controlled by the checkbox in front of its name. By selecting a layer, layer-specific settings can be made in the bottom right part. Most importantly, the "Filter" tab allows you to put a lower and upper threshold on the voxels.
- Navigate by using the mouse. Left-mouse button: rotate. Scroll-wheel / middle-mouse button: zoom. Right-mouse button: pan (only in Free camera mode). Change camera mode in "Options" menu.
- An explanation of the most important layers:
- C-skel measure (#5): the importance of each curve-skeleton voxel
- S-skel measure (#7): the importance of each surface-skeleton voxel (which is the maximum length among the shortest paths)
- Combined measure (#13): the combination of C-skel and S-skel measure by taking the maximum for each voxel
- C-skel detector (#4): the detected curve-skeleton voxels
- eft (#10): the extended feature transform. The feature sets can be made visible by selecting voxels.
- path set (#12): the shortest-path voxels associated with each skeleton voxel, only visible when voxels are selected
- To select voxels and inspect their values, hold Control and click a voxel. The value of the voxel in the currently selected layer is shown in the status bar at the bottom. To deselect a voxel press the right-mouse voxel. To deselect all voxels right-click the white background. Control selects the voxel in all layers. To select only in the current layer, hold Shift.
- The last selected voxel can be moved along the three axes using the keys
- If a layer of the "indexed voxels" type is checked for display, the associated voxels of the selected voxels are displayed. This is shown in the image below, which shows the extended feature transform (using line-segments) and shortest-path sets for two curve-skeleton voxels (using magenta voxels).
Creating simplified skeletons
As described in our paper, simplified skeletons are obtained by setting the threshold tau on our importance measure rho. In the application, this is done by choosing the Filter tab of the "Combined C-skel and S-skel measure" layer, and setting the lower threshold to the desired value. Because our measure is monotonic, the skeleton is ensured to be connected regardless the setting of tau, so tau need not to be tweaked. Simplified curve-skeletons in isolation can be obtained by setting the filter on the C-skel measure layer.
The example belows shows that for the noisy anvil (downloadable above), a setting of tau=17 yields a skeleton that is much more robust than tau=7.
Computing the skeleton of a shape
- To start skeletonization using the default settings, choose "Skeletonization -> Skeletonize" from the menu bar and choose the VTK file in the dialog box to be used as input. By default, both the surface and curve skeleton are computed. Settings can be changed from the "Skeletonization" menu and should be self-explanatory.
- After completion, the skeleton can be stored by choosing "File -> Save skeleton".
- Our software accepts binary voxel shapes in the form of a VTK file containing a STRUCTURED_POINTS dataset.
Meshes can be converted to this format using binvox, a mesh voxelizer written by Patrick Min, accepting various file formats such as .ply and .obj.
To convert a mesh using binvox, use
binvox -t vtk -d 256 input.obj from the command line. This voxelizes
input.obj with a maximum resolution of 256^3 voxels, and outputs a VTK file that can be read by our application.
- For skeletonization, resolutions up to 384^3 are workable with 1 GB of RAM available and depending on whether the surface and/or curve skeletons are computed. Higher resolutions might result in excessive computation time and memory consumption.
Limitations / known problems
- If too many voxels are tried to be rendered, the program might crash/hang. Set the filter so that not too many voxels are rendered.