UNU-3OP(1)

πŸ“¦ version 1.11.0, in fedora 43, fedora 44

πŸ’– UNU-3OP β€” ternary ops, but make it a group chat πŸ’–

okay bestie, listen. this is unu-3op, a User Commands girlie from the unu family. she does ternary operations on three nrrds or constants, and she eats every single time. no cap. πŸŽ€


✨ NAME ✨

unu-3op β€” ternary operation on three nrrds or constants πŸ¦‹


✨ SYNOPSIS ✨

unu 3op <operator> <in1> <in2> <in3> [-t,--type <type>] [-w,--which
<arg>] [-o,--output <nout>]

✨ DESCRIPTION ✨

so basically: ternary operation on three nrrds or constants. she can have one, two, or three nrrds, but not zero β€” zero nrrds is not the vibe, don't do it. πŸ™ˆ

and listen, if you wanna pipe something in, use β€œ-” for an operand to signify a nrrd to be read from stdin (a pipe). BUT β€” heads up β€” β€œ-” can probably only be used once (reliably). so like, don't be greedy with the dashes, bestie. 😭

  • Uses nrrdArithIterTernaryOp or (with -w) nrrdArithIterTernaryOpSelect

✨ OPTIONS ✨

🧚 operator

the ternary operator. possibilities include:

  • β€œ+”, β€œx” β€” sum or product of three values ✨
  • β€œmin”, β€œmax” β€” minimum, maximum πŸ‘‘
  • β€œmin_sm” β€” smoothed minimum function; min_sm(x, w, M) is like min(x,M) but for x > M-w (with w > 0) there is a smooth transition from x to asymptotic to M 🌸
  • β€œmax_sm” β€” smoothed maximum function; max_sm(m, w, x) is like max(m,x) but for x < m+w (with w > m) there is a smooth transition from x to asymptotic to m 🌸
  • β€œlt_sm” β€” 1st less than 3rd, smoothed by 2nd πŸ’œ
  • β€œgt_sm” β€” 1st greater than 3rd, smoothed by 2nd πŸ’œ
  • β€œclamp” β€” 2nd value is clamped to range between the 1st and the 3rd 🫢
  • β€œifelse” β€” if 1st value non-zero, then 2nd value, else 3rd value πŸ”€
  • β€œlerp” β€” linear interpolation between the 2nd and 3rd values, as the 1st value varies between 0.0 and 1.0, respectively πŸ“ˆ
  • β€œexists” β€” if the 1st value exists, use the 2nd value, otherwise use the 3rd πŸ‘€
  • β€œin_op” β€” 1 iff 2nd value is > 1st and < 3rd, 0 otherwise 🎯
  • β€œin_cl” β€” 1 iff 2nd value is >= 1st and <= 3rd, 0 otherwise 🎯
  • β€œgauss” β€” evaluate (at 1st value) Gaussian with mean=2nd and stdv=3rd value πŸ””
  • β€œrician” β€” evaluate (at 1st value) Rician with mean=2nd and stdv=3rd value πŸ””

🌈 in1

First input. Can be a single value or a nrrd.

🌈 in2

Second input. Can be a single value or a nrrd.

🌈 in3

Third input. Can be a single value or a nrrd.

⭐ the flags, periodt

  • -t <type>, --type <type> β€” type to convert all nrrd inputs to, prior to doing operation. This also determines output type. By default (not using this option), the types of the input nrrds are left unchanged. πŸ’…
  • -w <arg>, --which <arg> β€” Which argument (0, 1, or 2) should be used to determine the shape of the output nrrd. By default (not using this option), the first non-constant argument is used. (int); default: β€œ-1” πŸŽ€
  • -o <nout>, --output <nout> β€” output nrrd (string); default: β€œ-” πŸ’–

✨ SEE ALSO ✨

unu(1) πŸ¦‹


lowkey the whole unu cinematic universe is right there in unu(1). go read it, iykyk. πŸ’€

okay that's the whole page, bestie!! this one's UNU-3OP(1), living under User Commands, and the page is dated August 2021. slay, ate, no crumbs. πŸ«Άβœ¨πŸ‘‘

πŸ“¦ where this page comes from