DATAMANIP (kdatamanip) functions


LIBRARY ROUTINE

lkpad - perform the padding of a data object

LIBRARY CALL

int lkpad (
   kobject src_obj,
   int     w_size,
   int     h_size,
   int     d_size,
   int     t_size,
   int     e_size,
   int     w_off,
   int     h_off,
   int     d_off,
   int     t_off,
   int     e_off,
   double  real,
   double  imag,
   int     wrap,
   int	   valid,
   kobject dst_obj)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) on failure

DESCRIPTION

Library Routine for kpad. lkpad performs the padding of a data object. The offset parameters define where the origin of the source object will lie with respect to the output object. Specifying an offset greater than zero can be used to generate a border around the original data. Negative offset values result in truncation of data lying in the region (0-w_off, 0-h_off, 0-d_off, 0-t_off, 0-e_off) For example, given an offset of (-1,-1,0,0,0), the object will effectively be shifted by -1 in the width and height dimensions, and that data truncated. If the offset plus the original data size is greater than the specified destination size, truncation of the data will occur.

The imag and real input parameters are the pad values used. If the input data object type is not complex, the imaginary pad value will be ignored. For data objects that are not of type double, pad values will be cast so that the output object is the same type as the input object.

The regions outside the original data bounds can also be filled by wrapping data from the opposite side of the dataset by specifying the wrap argument to be TRUE. This will override the pad value functionality.

Mask data corresponding to padded data will be padded non-zero if the valid flag is TRUE, and padded with zeros if the valid flag is FALSE. Mask data corresponding to the source object will be transferred unaltered.

If curvilinear or rectilinear time or location data exist, it is unclear how to alter the dimensionality, and lkpad will fail. If uniform location data exist lkpad will not fail, but it will not alter the location data in any way. yet.

lkpad does not modify map data - it directly pads the value data. The data is not mapped first.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATAMANIP/objects/library/kdatamanip/src/lkpad.c

SEE ALSO

kdatamanip(3)

COPYRIGHT

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