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

  unu resample

unu resample: Filtering and {up,down}sampling with a seperable kernel.
Provides simplified access to nrrdSpatialResample() by assuming (among other
things) that the same kernel is used for resampling every axis (every axis
which is being resampled), and by assuming that the whole axis is being
resampled (no cropping or padding). Chances are, you should use defaults for
"-b" and "-v" and worry only about the "-s" and "-k" options. This resampling
respects the difference between cell- and node-centered data.

Usage: unu resample -s <s0  ...> [-k <kern>] [-b <behavior>] [-v <value>] \
       [-t <type>] [-i <nin>] [-o <nout>]

  -s <s0 ...> = For each axis, information about how many samples in output:
              o "=": leave this axis completely untouched: no resampling
              o "x<float>": multiply the number of input samples by
                <float>, and round to the nearest integer, to get the number
                of output samples. Use "x1" to resample the axis but leave the
                number of samples unchanged
              o "<int>": exact number of output samples
                (1 or more sampling specifications)
    -k <kern> = The kernel to use for resampling. Possibilities include:
              o "box": nearest neighbor interpolation
              o "tent": linear interpolation
              o "cubic:B,C": Mitchell/Netravali BC-family of cubics:
                  "cubic:1,0": B-spline; maximal blurring
                  "cubic:0,0.5": Catmull-Rom; good interpolating kernel
              o "quartic:A": 1-parameter family of interpolating quartics
                ("quartic:0.0834" is most accurate)
              o "gauss:S,C": Gaussian blurring, with standard deviation S
                and cut-off at C standard deviations
                default: "quartic:0.0834"
-b <behavior> = How to handle samples beyond the input bounds:
              o "pad": use some specified value
              o "bleed": extend border values outward
              o "wrap": wrap-around to other side
                default: "bleed"
   -v <value> = for "pad" boundary behavior, pad with this value (double);
                default: "0.0"
    -t <type> = type to save output as. By default (not using this option),
                the output type is the same as the input type.;
                default: "unknown"
     -i <nin> = input nrrd; default: "-"
    -o <nout> = output nrrd (string); default: "-"