IM_CREATE

im_create - create a KUIM image file for writing

Synopsis

IM_TYPE *im_create(Name, PixType, Xdim,Ydim,Zdim)
   char *Name;
   int PixType, Xdim,Ydim,Zdim;

Description

The im_create routine creates a KUIM format image file and returns a pointer to an IM_TYPE data structure containing the information needed by other KUIM subroutines. The desired pixel type and image size are specified by function arguments. The parameters to this routine are:

Name - This is a null-terminated string containing the pathname of the file to be created. If a file with this name already exists, the routine will terminate. If "/dev/null" is specified, an IM_TYPE data structure is created, but no file is created. This is useful for creating temporary memory only images.

PixType - This is a value which specifies the type of pixel data stored in the image. Valid values for this field are: BYTE, SHORT, INT, FLOAT, DOUBLE, COMPLEX, COLOR, PSEUDO (all defined in IM.h).

Xdim - This is the number of pixels in the X dimension in the image. For all 1D, 2D and 3D images this value must be greater than 1.

Ydim - This is the number of pixels in the Y dimension in the image. For 1D images, this value must be 1. For 2D and 3D images, it must be greater than 1.

Zdim - This is the number of pixels in the Z dimension in the image. For 1D and 2D images, this value must be 1. For 3D images, it must be greater than 1.

Files

Source is in $KUIM/src/libIM

See Also

im_create, im_open, im_read, im_write, im_get_title, im_put_title, im_get_cmap, im_put_cmap, im_alloc1D, im_alloc2D, im_alloc3D, im_free1D, im_free2D, im_free3D.

Author

John M. Gauch
Electrical Engineering and Computer Science
University of Kansas

Diagnostics

When this routine succeeds, it returns a pointer to IM_TYPE. Upon occurrence of any error condition, a message is printed and the program exits.