Get Teem at SourceForge.net. Fast, secure and Free Open Source software downloads
teem / unrrdu

  unu quantize

unu quantize: Quantize values to 8, 16, or 32 bits. Input values can be fixed
point (e.g. quantizing ushorts down to uchars) or floating point. Values are
clamped to the min and max before they are quantized, so there is no risk of
getting 255 where you expect 0 (with unsigned char output, for example). This
does not do any non-linear quantization. See also "unu convert", "unu 2op x",
and "unu 3op clamp".

Usage: unu quantize -b <bits> [-min <value>] [-max <value>] [-i <nin>] \
       [-o <nout>]

   -b <bits> = Number of bits to quantize down to; determines the type of the
               output nrrd:
             o "8": unsigned char
             o "16": unsigned short
             o "32": unsigned int
-min <value> = Value to map to zero. Defaults to lowest value found in input
               nrrd. (double)
-max <value> = Value to map to highest unsigned integral value. Defaults to
               highest value found in input nrrd. (double)
    -i <nin> = input nrrd
   -o <nout> = output nrrd (string); default: "-"