UNU-DIST(1)
π UNU-DIST(1) β bestie's guide to the Euclidean distance transform π
okay so like, welcome to unu-dist, part of the unu user commands era (yes it lives in section 1 of the manual, we're fancy). this is the β¨Euclidean distance transformβ¨ and honestly? it's giving main character energy. buckle up π
β¨ NAME β¨
unu-dist β Euclidean distance transform π¦
β¨ SYNOPSIS β¨
unu dist -th,--thresh <val> [-b,--bias <val>] [-t,--type <type>] [-sgn]
[-inv] [-i,--input <nin>] [-o,--output <nout>]
β¨ DESCRIPTION β¨
so basically it's a Euclidean distance transform, no cap. it's based on βDistance Transforms of Sampled Functionsβ by Pedro F. Felzenszwalb and Daniel P. Huttenlocher, Cornell Computing and Information Science TR2004-1963 β literal icons, we stan π
here's the tea on how it works: this function first thresholds at the specified value and then does the distance transform of the resulting binary image. two steps, one slay β¨
the signed distance (negative values inside the object) is also available if you want it β more on that below. and distances between non-isotropic samples are handled correctly, which, like, thank god π
- Uses
nrrdDistanceL2ornrrdDistanceL2Signed
β¨ OPTIONS β¨
-th <val>,--thresh <val>β the threshold value that separates inside from outside (adouble). this one's required bestie, it's not optional, the synopsis said so π«Ά-b <val>,--bias <val>β if it's non-zero, this biases the distance transform by this amount times the difference in value from the threshold (adouble). default:"0.0"β so yeah, zero bias unless you say otherwise π-t <type>,--type <type>β the type to save output in. default:"float"β¨-sgnβ also compute signed (negative) distances inside objects, instead of leaving them as zero. so instead of a flat zero inside, you get those lil negative numbers π-invβ values below threshold are considered interior to the object. by default (aka when you don't use this option), values above threshold are considered interior. so this literally flips the vibe check on what counts as "inside" πΈ-i <nin>,--input <nin>β input nrrd π¦-o <nout>,--output <nout>β output nrrd (astring); default:"-"(which means stdout, standard behavior, iconic) π
β¨ SEE ALSO β¨
unu(1) β go read it, it's the whole family, iykyk π«Ά
lowkey reminder:-th/--threshhas no default and is not bracketed in the synopsis, so bestie, you gotta give it a value. no skipping π
and that's the whole page!! π this was the unu-dist manual, from the User Commands era, dated May 2021 β mwah, periodt, go transform some distances πβ¨π
π¦ where this page comes from
- fedora 43: teem 1.11.0-83.fc43 Β· LGPL-2.1-or-later WITH LicenseRef-Fedora-Temporary-Simple-Library-exception
- fedora 43: teem 1.11.0-86.fc43 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- fedora 44: teem 1.11.0-87.fc44 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms