|
Purpose
|
Creates a new raster image. |
|
Return value
|
Returns a raster image identifier if successful and FAIL (or -1) otherwise. |
|
Description
|
GRcreate creates a raster image with the values provided in the parameters name, ncomp, data_type, interlace_mode and dim_sizes. |
|
|
The parameter name specifies the name of the image and must not be NULL. The length of the name should not be longer than MAX_GR_NAME (or 256). |
|
|
The parameter ncomp specifies the number of pixel components in the raster image and must have a value of at least 1. |
|
|
The parameter data_type specifies the type of the raster image data and can be any of the data types supported by the HDF library. The data types supported by HDF are listed in Table 1A in Section I of this manual. |
|
|
The parameter interlace_mode specifies the interlacing in which the raster image is to be written. The valid values of interlace_mode are: MFGR_INTERLACE_PIXEL (or 0), MFGR_INTERLACE_LINE (or 1) and MFGR_INTERLACE_COMPONENT (or 2). |
|
|
The array dimsizes specifies the size of the two dimensions of the image. The dimensions must be specified and their values must be greater than 0. |
|
|
Once a raster image has been created, it is not possible to change its name, data type, dimension sizes or number of pixel components. However, it is possible to create a raster image and close the file before writing any data values to it. Later, the values can be added to or modified in the raster image, which then can be obtained using GRselect. |