IM_OPEN

im_open - open a KUIM image file for reading

Synopsis

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

Description

The im_open routine opens a KUIM format image file for reading and returns a pointer to an IM_TYPE data structure containing the information needed by other KUIM subroutines. Key field from the image header are also read and returned in function arguments. The parameters to this routine are:

Name - This is a null-terminated string containing the pathname of the file to be opened.

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 will be greater than 1.

Ydim - This is the number of pixels in the Y dimension in the image. For 1D images, this value will be 1. For 2D and 3D images, it will 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 will be 1. For 3D images, it will be greater than 1.

DimCnt - This is the number of dimensions in the image. This value will be between 1 and 3. Higher dimension KUIM images are not supported.

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.