RISsetType(3DTM)

NAME
RISsetType, RISgetType - Raster image typing macros.

SYNOPSIS
#include <ris.h>

RISsetType(char *header, RISTYPE raster_type)

RISgetType(char *header, RISTYPE *raster_type)

DESCRIPTION
RISsetType inserts into the string header the tag RIStype immediately followed by a tag identifying the raster_type of the image. The tag type should be either RIS8BIT or RIS24BIT. See RISclass for more information about these two types. It is up to the user to ensure that the data type specified matches the data sent. RISsetType also inserts the DTM type tag followed by the tag for the type DTM_CHAR. This is set to ensure that each RISclass message can still be considered a full-blown SDSclass with the data type DTM_CHAR.

RISgetType examines the string header, and if the RIStype tag if found, sets the argument raster_type to be the following value. The two defined values that can be returned are RIS8BIT and RIS24BIT. See RISclass for more information about these two types. If the RIStype tag was not found within the header, the raster_type argument receives a default value of RIS24BIT.

SEE ALSO
DTM, RISclass

DIAGNOSTICS
RISgetType returns the error DTMERROR if the header does not contain the tag RIStype or if no value follows the RIStype tag. In either case, the value of raster_type still defaults to RIS24BIT.

BUGS
RISsetType has no way of determining if the header contains sufficient space to hold the tag RIStype, the raster_type value, the DTM type tag, and the DTM_CHAR tag. The results of attempting to store this information beyond the end of the allocated space are undefined.