unu-3op - Man Page
ternary operation on three nrrds or constants
Synopsis
unu 3op <operator> <in1> <in2> <in3> [-t,--type <type>] [-w,--which <arg>] [-o,--output <nout>]
Description
Ternary operation on three nrrds or constants. Can have one, two, or three nrrds, but not zero. Use “-” for an operand to signify a nrrd to be read from stdin (a pipe). Note, however, that “-” can probably only be used once (reliably).
- Uses nrrdArithIterTernaryOp or (with -w) nrrdArithIterTernaryOpSelect
Options
- operator
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) 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.
- -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
Referenced By
unu(1), unu-convert(1), unu-mrmap(1), unu-quantize(1).