# Sampling and Visualizing Creases with Scale-Space Particles

### The Paper

Paper PDF. This version of the paper includes corrections of the errata below. The colors also look better, without the needless desaturation applied to the published version. A related video is here.

### Reference

@ARTICLE{Kindlmann2009,
author = {Gordon L. Kindlmann and Ra{\'u}l San Jos{\'e} Est{\'e}par and Stephen M. Smith and Carl-Fredrik Westin},
title = {Sampling and Visualizing Creases with Scale-Space Particles},
journal = {IEEE Trans. Visualization and Computer Graphics},
month = {Nov/Dec},
year = {2009},
volume = {15},
number = {6},
pages = {1415--1424},
doi = {10.1109/TVCG.2009.177}
}


### The Software

All the code for computing the particle systems described in the paper is in Teem. The code for glyph-based visualization is not currently released, but nor would it be hard to re-implement given a tensor visualization tool that supports superquadric tensor glyphs.

The particle system is implemented in the "pull" library of Teem; a new version 1.11 will be released soon. The information below refers to the current trunk (SVN info Teem) as of 12 Dec 2009, but the same API will be in version 1.11.

A relatively easy way to access the information in Teem is via Python, and the automatically generated ctypes interface that permits Teem to be used from Python without having to compile any glue code (as with Swig or Cython). The examples below use the python wrappers in

teem/python/ctypes/teem.py
teem/python/ctypes/pullDemo.py

These python programs assume (in their use of "import teem") that the location of the shared library for all of Teem, created by CMake, is in whatever library path variable your OS uses for this purpose.

Mobius strip example This does not demonstrate scale-space behavior, but it does include a ridge surface sampling.

• Dataset: fmob-c4h.nrrd (pre-filtered so that convolution with the "c4h" kernel interpolates the original volume)
• Code: mobius.py. Run with "python mobius.py".
• Results: The following unu commands provide a quick-and-dirty way of assessing the output of the system:
unu dice -i npos.nrrd -a 0 -o ./
unu jhisto -i 0.nrrd 1.nrrd -min -0.8 -0.8 \
-max 0.8 0.8 -b 300 300 -t float \
| unu 1op log1p \
| unu quantize -b 8 -o mobius.png

See mobius.png. Your results may vary from this due to accumulated differences in floating-point computations between different processors. The image above uses the D1 glyphs described in the paper to show local Hessian information per point.

Variable width torus example
This uses the scale-space capability of the system, as well as the approach of breaking up the computation into a first phase of using Phi1 (for sampling across scales), then a short phase of using alpha=0 (to attract to scale of maximal strength), and then a final phase of using Phi2 to regularize the sampling density along the ridge.

The images above show visualizations of the outputs of phase 1, 2, and 3 with D1 glyphs vertically positioned along scale, and phase 3 with D2 glyphs in normal 3D. Colormapping is of feature strength (like in the paper's teaser figure).

### Errata

There are unfortunately some errors in the original version (published by IEEE online and as part of conference proceedings).

1. This is a confusing error for anyone trying to reproduce this work. On Page 6, 2nd column, the beginning of the paragraph containing Eqs. (25) and (26), the sentence that reads:

When using $\Phi_2$ to sample maximal strength creases, it is helpful to run the system until approximate convergence with $\gamma=0.0$ and $\alpha=1.0$, turning off all spatial interaction.
When using $\Phi_2$ to sample maximal strength creases, it is helpful to run the system until approximate convergence with $\alpha=0.0$ and $\beta=1.0$, turning off all spatial interaction.
What really matters is that \alpha=0.0; this means that the only energy is due to particle-image interaction, rather than particle-particle interaction. The value of \gamma can be anything non-zero, for example \gamma=1.0. Once particles have settled on the scales of maximal strength, you can automatically compute \gamma with Eqs. (25) and (26).

2. On Page 9, bottom of 1st column, the funding sources that read:

Funding provided by NIH grants U41 RR019703, 5U01 HL089856-02, P41-RR13218, and R01-MH074794.