int dunload_vector(
char **input_vectors,
xvimage *image,
unsigned long type,
int num_vects,
int dimension,
int process_dir)
dunload_vector should be called at the end of any dsp1 routine that calls dload_vector. This routine loads the vector array back into (multiband) image format. Again, dunload_vector arranges the output data according to the process_dir variable (DSP_VECTOR or DSP_BAND) passed in.
dunload_vector does the following: 1. Loads the data into image format (done differently for vector vs. band processing directions) You pass in a pointer to the xvimage structure and dunload_vector assigns the data to a 1-d data array, and then assigns this array to image->imagedata. 2. If process direction = DSP_VECTOR, resets image->num_data_bands to dimension, and calls unload_vector. 3. If process direction is DSP_BAND, resets image->col_size and/or image->row_size if dimension of data has been altered. (ie. dimension != rows*cols). New row and col sizes are set according to the following rules. (dim already divided by 2 if data is complex.) if num_rows = 1, num_cols = dim/num_rows else if num_cols = 1, num_rows = dim/num_cols else if dimension divisible by num_rows, num_cols = dim/num_rows else if dimension divisible by num_cols, num_rows = dim/num_cols else num_cols =1, num_rows = dimension.
4. Sets image->data_storage_type to type passed in.
DSP_VECTOR Process Direction: If the parameter process_dir = DSP_VECTOR (0), each vector represents a pixel and the dimension of the vector represents the number of data bands for the image. So the mth element of vector t represents pixel t in the mth data band. Therefore, the image is built by filling row by row from the linear vector data.
DSP_BAND Process Direction: If the parameter process_dir = DSP_BAND (1), each vector represents a band and the dimension of the vectors is given by rows*cols. In this case, the image is built by assigning each vector to a band in the output image.
none
none
$RETRO/objects/library/vutils/src/dunloadvect.c