SE_rasterattr_set_colormap

Sets the colormap for the raster.

Usage syntax

LONG SE_rasterattr_set_colormap (SE_RASTERATTR handle, SE_COLORMAP_TYPE colormap_type, SE_COLORMAP_DATA_TYPE data_type, LONG num_entries, const void *data);

Parameters
handle The SE_RASTERATTR handle
colormap_type The colormap type
data_type The data type of the color map data
num_entries Number of entries in the colormap array
data A pointer to the colormap data
Description

SE_rasterattr_set_colormap sets the colormap, also known as the raster color lookup table (LUT).When a colormap is in use, the pixel values represent an index to the colormap. For instance, a pixel value of 16 would index the sixteenth element of the color map. The application renders the pixel according to the intensity of colors defined by the color map element.

Colormaps can only be applied to single band rasters whose bit depth is either 8 or 16 bit. The allowable compression type for rasters with colormaps map is LZ77 (SE_COMPRESSION_LZ77). If a pyramid is created, only the nearest neighbor (SE_INTERPOLATION_NEAREST) interpolation type is allowed. These restrictions are necessary since color mapped rasters must be able to map to a discrete set of values that will not be resampled.

Colormaps are not verified by the ArcSDE server. It is the responsibility of the application to verify the values contained in the colormap.

Notes

The colormap types are:

  SE_COLORMAP_NONE - A color map is not defined for this image. This is the default. Use this enumeration to undefine an existing color map.
  SE_COLORMAP_RGB - The color map has three element commonly used to store a three color intensity map
  SE_COLORMAP_RGBA - The color map has four element commonly used to store a three color intensity map and a fourth element that defines transparency.

The colormap datatypes are:

 SE_COLORMAP_DATA_BYTE - The colormap data is stored as unsigned character.
  SE_COLORMAP_DATA_SHORT - The colormap data is stored as unsigned short (2 byte) integer.

The colormap data is a single dimension array.

If the colormap type is SE_COLORMAP_RGB,
it should have the following structure: r0, g0, b0, r1, g1, b1,...,rn,gn,bn.

If the colormap type is SE_COLORMAP_RGBA,
it should have the following structure: r0, g0, b0, a1, g1, b1, t1,...,rn,gn,bn,tn.

Returns

SE_SUCCESS
SE_FAILURE

SE_DB_IO_ERROR

SE_INVALID_POINTER

SE_NET_FAILURE

SE_SDE_NOT_STARTED