RETRO (vutils) functions


LIBRARY ROUTINE

dload_vector - rearrange xvimage data into a vector for 1.0 DSP routines

LIBRARY CALL

char **dload_vector(
	xvimage *image,
	int     *num_vects,
	int     *dimension,
	int      process_dir)

INPUT

OUTPUT

RETURN VALUE

an array of vectors

DESCRIPTION

This routine is a dsp utility which takes a multiband data file and rearanges the data so that the it is stored as a list of vectors. dload_vector should be called at the beginning of each dsp1 routine to convert data to vector format. It formats the data according to the process direction (DSP_VECTOR, DSP_BAND) passed in. A **char vector data array is returned, and the values for the num_vects and dimension are set. Dimension refers to the number of points in each vector. If the data is complex, dimension is the number of complex PAIRS per vector.

Dload_vector checks that number of image data bands is at least 1. If data processing is in DSP_VECTOR direction, Calls load_vector. If data processing is in DSP_BAND direction, assigns data to 2 dimensional vector array.

DSP_VECTOR Processing Direction: Each pixel in a multiband image can be thought of as a vector looking down all the bands. Thus, each pixel is a vector with dimension = number of data bands. This format is obtained if the parameter, process_dir, passed to dload_vector is DSP_VECTOR (0). Memory is allocated for the vector array by load_vector.

When process_dir = DSP_VECTOR, dload_vector will scan the image row by row making a linear 2-dimensional array, where the first array index points to a vector (which corresponds to some pixel), the second array index contains the values for that pixel looking down the bands on the image. Memory is allocated for the vector array in dload_vector.

DSP_BAND Processing Direction: If process_dir is DSP_BAND (1), the calling routine requires that each data band be represented as a vector. Therefore dload_vector will return a 2-dimensional array where each band is a vector of dimension rows*cols.

Data type can be of any type except BIT.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

Restrictions on data or input as applicable

MODIFICATION

Converted to 2.0 by SJ

FILES

$RETRO/objects/library/vutils/src/dloadvect.c

SEE ALSO

vutils(3)

COPYRIGHT

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