Skip to content

Intuition for Setting Parameters const and scale

William Silversmith edited this page Aug 8, 2019 · 5 revisions

If you're not familiar with the basics of the skeletonization procedure, check out this visual tutorial!

Newcomers to Kimimaro often lack an intuition for how to set parameters. Most of the time, the defaults are fine and you shouldn't need to touch them, with the exception of scale and const which control the detail capture sensitivity of the procedure. scale and const control the radius of the invalidation sphere according to the equation:

r(x,y,z) = scale * D(x,y,z) + const

Where the units of D(x,y,z) and const are physical units (e.g. nanometers), scale is dimensionless, and the output is in physical units. D(x,y,z) is the euclidean distance to the boundary of the shape at that voxel.

However, what does that mean practically?

Depiction of four different situations where const varies but scale is set to zero.

If we set scale = 0 we can get some insight into what const does. (top left) const is set to a value smaller than the radius of a tube. This results in inadequate masking (circles) and provides space for multiple additional paths to be traced. The blue path traced to point t2 is the second path traced. Many more would come after it. (top right) We use a const larger than the radius of the tube, which results in sufficient masking that no additional paths are traced. (bottom left) We have a branched structure and use a radius slightly larger than the width of the tube. This provides sufficient masking along the first path, and allows the second path the be discovered, traced, and masked sufficiently. (bottom right) We use a const value much larger than the typical width of the tube. This obscures a bump that could either be a legitimate feature we'd like to skeletonize or an aberrant feature we would like to ignore.

Depiction of two situations where scale varies but const is set to zero.

If we instead hold const to 0 and allow scale to vary, we can gain insight into its function. (top) With scale = 1, in this tube with a bulge in it, assuming it is perfectly symmetrical, the distance transform will give a radius that will allow it to be perfectly masked. (bottom) With scale = 0.5, only a fraction of the volume is masked along the path. Note the increase in masking volume in the bulge interior and the trailing off in size at the ends of the path.

Clone this wiki locally