Other Alias
VistaIOCreateImageSYNOPSIS
#include <vistaio.h>
VistaIOImage VistaIOCreateImage (nbands, nrows, ncolumns, pixel_repn)
- int nbands, nrows, ncolumns; VistaIORepnKind pixel_repn;
VistaIOImage VistaIOCreateImageLike (src)
- VistaIOImage src;
ARGUMENTS
- nbands
- Specifies the number of bands in the new image.
- nrows
- Specifies the number of rows in the new image.
- ncolumns
- Specifies the number of columns in the new image.
- pixel_repn
- Specifies the representation of pixels in the new image. It must be one of VistaIOBitRepn, VistaIOUByteRepn, VistaIOSByteRepn, VistaIOShortRepn, VistaIOLongRepn, VistaIOFloatRepn, or VistaIODoubleRepn.
- src
- Specifies an image having the properties desired of the new image.
DESCRIPTION
VistaIOCreateImage allocates memory for a new image with the specified properties. Fields of the new image structure are initialized, as are the image's row and band indices. Its pixel values, however, are not initialized. The new image is given an empty attribute list. The size of its frame band interpretation dimension (nframes) is set to nbands; its other band interpretation dimensions (nviewpoints, ncolors, and ncomponents) are set to 1.VistaIOCreateImageLike allocates memory for a new image with the same properties as src (same pixel representation, and same numbers of bands, rows, and columns). Fields of the new image structure are initialized, as are the image's row and band indices. Its pixel values, however, are not initialized. The new image is given a copy of src's attribute list, and the sizes of its band interpretation dimensions (nframes, ..., ncomponents) are set identical to those of src.
RETURN VALUES
If successful, these routines return a pointer to the newly-allocated image structure. Otherwise, ther return NULLDIAGNOSTICS
- ``Invalid number of dimension: value.''
- Dimension is ``bands'', ``rows'', or ``columns''. An inappropriate value, value, was specified for that dimension.
- ``Invalid pixel representation: repn.''
- The representation kind specified is not one of the valid pixel representations.