DATAMANIP commands


PROGRAM NAME

ksampline - Sample a data object along an arbitrary line

DESCRIPTION

ksampline is used to sample the data in an object along an arbitrary line and at arbitrary intervals. The value at each sample point is obtained by an inverse distance weighting scheme.

The first sample point is precisely at the starting coordinate and the final sample is precisely at the ending coordinate.

The line may traverse any portion of the 5D data space. If a particular sample on the line lies outside the data space then the values will be interpolated using a padding value of zero.

The output object will be of the same data type as the input object. If a map is present in the input object, then the value data is sent through the map before processing. The output data will thus have no map.

Mask data, if present, is used to help control the interpolation. Value points with a corresponding mask value of zero will not be included in the interpolated value. However, a minimum number of neighboring values with a valid mask are required in order to produce a valid output value; non-valid output values are marked by a zero mask. If the mask segment is not present, then all value points in the source object are assumed to be valid.

The actual minimum required neighbor count is determined by the setting of the "nc" argument. If nc is zero, then the minimum required neighbor count will be computed from the dimensionality of the source data set. For nc=0, the minimum required neighbor count is 0.5*(2^dim)+1 where dim is the dimensionality of the source object (1 for a line, 2 for a plane, 3 for a volume, etc). If nc is non-zero, then the minimum required neighbor count is simply nc. Beware of non-intuitive results when interpolating across mask wise non-convex parts of the data object. The default minimum required neighbor count gives "reasonable" answers in these cases. Reducing the minimum required neighbor count can provide answers that are less and less meaningful.

Note that ksampline samples the data as if it were using a delta function. This implies that you may get significantly different results depending on the position of each sample location. You may wish to lowpass the source data before sampling with ksampline to avoid aliasing. This can be particularly important when dealing with "holey data" or when the sampling involves degenerate geometry (such as sampling a plane object with a sampling line that does not lie in the plane).

ksampline is implemented using point data access. A point data access is done for each sample in the line. This implies that a large number of samples may require quite some time to compute, particularly if operating on a higher dimension data set.

REQUIRED ARGUMENTS

-i
type: infile
desc: input data object
-o
type: outfile
desc: output data object

OPTIONAL ARGUMENTS

-wc1
type: double
desc: coordinate of start of line along W axis
default: 0
bounds: no range checking
-wc2
type: double
desc: coordinate of end of line along W axis
default: 511
bounds: no range checking
-hc1
type: double
desc: coordinate of start of line along H axis
default: 0
bounds: no range checking
-hc2
type: double
desc: coordinate of end of line along H axis
default: 511
bounds: no range checking
-dc1
type: double
desc: coordinate of start of line along D axis
default: 0
bounds: no range checking
-dc2
type: double
desc: coordinate of end of line along D axis
default: 0
bounds: no range checking
-tc1
type: double
desc: coordinate of start of line along T axis
default: 0
bounds: no range checking
-tc2
type: double
desc: coordinate of end of line along T axis
default: 0
bounds: no range checking
-ec1
type: double
desc: coordinate of start of line along E axis
default: 0
bounds: no range checking
-ec2
type: double
desc: coordinate of end of line along E axis
default: 0
bounds: no range checking
-n
type: integer
desc: number of samples (including endpoints)
default: 1000
bounds: no range checking
-nc
type: integer
desc: minimum required neighbor count
default: 0
bounds: 0 < [-nc] < 32

EXAMPLES

SEE ALSO

RESTRICTIONS

REFERENCES

COPYRIGHT

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