UDF PROGRAMMERS MANUAL
| BuildImage (1) |
UDF PROGRAMMERS MANUAL |
BuildImage (1) |
NAME BuildImage
SYNOPSIS
| #include "libbase_udf.h" |
| ByTe_2 |
BuildImage |
(u_ByTe_4 Key, ByTe_1 *Ex,
u_ByTe_2 vN, void *UDF,
struct MatrixData *Md,
ByTe_1 Storage); |
INPUT DEFINITIONS
| Key |
- |
UDF data key |
| Ex |
- |
UDF file extension |
| vN |
- |
UDF version number |
| UDF |
- |
pointer to general UDF data structure |
| Md |
- |
pointer to a variable of type struct MatrixData |
| Storage |
- |
UDF image definition |
| |
| 0 |
- |
Each UDF sensor is a pixel in the image and each
array element under the sensor is data from one
image plane. |
| 1 |
- |
Each UDF sensor is a column in an image and each array
element under the sensor comes from one row in the image.
Separate sensors form separate images. |
|
DESCRIPTION
BuildImage assembles one instance of all the defined images
from the UDF source identified with Key and Ver. UDF
is used when assembling the images(s) which are returned in the Md
structure. Storage is used to indicate how the images have been
stored within the UDF definition. Once the image(s) have been built the
routine does an automatic forward in the data set to that on the next
call the next set of image(s) will be returned.
It should be noted that this is only a loosely generic routine. There
are a number of caveats associated with it which the user must be
aware of.
-
BuildImage does not internally determine if the UDF associated
with Key contains image data.
-
BuildImage assumes that the image(s) being built begin in the first
sensor set of a UDF data record. Because of this it is necessary to use
FilePosRec to do the initial time positioning
into the file.
-
BuildImage assumes that an image does not span multiple UDF data
records.
-
BuildImage assumes that all of the defined UDF sensors are used
to assemble the image(s).
-
The returned images are stored in the Data field of the
Md structure as ReaL_4.
Images are always stored column by column.
-
In Storage 0 images the sensors, which form the image pixels,
must form an increasing or decreasing set of pixels in an image column.
-
In Storage 0 the first returned image is assembled from the first
image plane (scan index 0 for from each pixel), the second from the second
image plane and so forth.
-
Should a Storage 0 UDF have been defined so its sensors represent
multiple images with multiple planes, then the following will occur. The
image column length which is returned in the
Md structure in the field TRows will be to sum column length
of each of the returned images. Each column of image data in the
returned image will consist of column of image data from each of the
defined images butted up against one another. As an example, there are
30 sensors in a Storage 0 UDF with the first 10 sensors forming
image A, next 14 forming image B, and the last 6 forming image C. The
Md will indicate that the column length of the returned images
is 30. The first 10 values in the returned image array are the first
column of image data from plane 1 in IMAGE A, the next 14 values are
the first column of image data from plane 1 in IMAGE B, and the last
6 values are the first column of image data from plane 1 in IMAGE C.
The column lengths of the individual images is not returned and must
be known apriori by the user.
-
In Storage 1 the first returned image is assembled from UDF sensor
0, the second from the sensor 1, and so forth.
Under normal conditions Ext should be set to a NULL string.
Setting Ext to a non-NULL string will cause the file_pos
routine to attempt to use the appropriate named UDF header and data
files but with the string .Ext appended to it. The file must
exist in the current working directory.
RETURN VALUE
RETURN VALUE
On success, ALL_OKAY is returned, otherwise an error code is
returned.
ERRORS
DREC_NOT_FILLED No opened file (file_open not called?)
DREC_NO_FILES No opened file: file_open not called
LOS_STATUS No more data in data file
NEXT_FILE_STATUS Data is in next data file
APPLICABLE FORMATS
UDF V2.2, IDFS V2.1
RESTRICTIONS
None.
SEE ALSO
MatrixData (1S)
CreateMatStruc (1)
BuildMatrix (1)
| UDF V2.2 | Sept 1, 2000 |
UDF V2.2 |