DATAMANIP commands


PROGRAM NAME

kshrink - Shrink Object Via Pixel Subsampling

DESCRIPTION

The Shrink Object operator (kshrink) reduces the size of the Input data object (i) using pixel subsampling. Reduction factors for each dimension, Width (wmag), Height (hmag) Depth (dmag), Time (tmag), and Elements (emag) can be specified. Reduction factors between zero and one will reduce the object size. (Factor values greater than 1 are also valid, and will expand the object.) The resultant output object size will be the original size multiplied by the reduction factor for that dimension, and rounded.

Pixel subsampling is done on a floating point indexing basis, where the data point index is obtained by truncating the cumulative floating point index. Therefore, when the calculated subsampling step size is non-integer, the resulting integer step size varies during the process.

Data Type The data type of the output object is the same as the input object's data type. Internally, the data is processed using one of the following: unsigned byte, long, unsigned long, double, or double complex. Data will not be cast to a lower type for processing.

If there is map and value data in the source object, the map is transferred to the destination object.

Failure Modes This program fails if the input object lacks both map data and value data.

If explicit location or time data are available, the sampling algorithm can not resample these data yet, and will fail. This will be implemented later ....

Executing Shrink Object runs the program kresample with -resize set to true and -inter set to 0.

REQUIRED ARGUMENTS

-i
type: infile
desc: Input object
-o
type: outfile
desc: Resulting subsampled object

OPTIONAL ARGUMENTS

-wmag
type: double
desc: Reduction factor in width dimension
default: 0.5
bounds: value > 0.0
-hmag
type: double
desc: Reduction factor in height dimension
default: 0.5
bounds: value > 0.0
-dmag
type: double
desc: Reduction factor in depth dimension
default: 1
bounds: value > 0.0
-tmag
type: double
desc: Reduction factor in time dimension
default: 1
bounds: value > 0.0
-emag
type: double
desc: Reduction factor in elements dimension
default: 1
bounds: value > 0.0

EXAMPLES

SEE ALSO

DATAMANIP::kresample, DATAMANIP::kexpand

RESTRICTIONS

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.