DS_CMAP_FIND_COLOURMAP(3)

FUNCTION
ds_cmap_find_colourmap - Search a Karma data structure for an instance of a colourmap.

SYNOPSIS
#include <karma_ds.h>

unsigned short * ds_cmap_find_colourmap

(packet_desc *top_pack_desc, char *top_packet, unsigned int *size, flag *reordering_done, CONST char *restr_names[], double *restr_values, unsigned int num_restr)

DESCRIPTION
Search a Karma data structure for an instance of a colourmap.

top_pack_desc
    The top level packet descriptor.

top_packet
    The top level packet data.

size
    The size of the colourmap (number of colours) in the colourmap will be here.

reordering_done
    The routine is tolerant of incorrect ordering of the intensity elements. If they are ordered incorrectly, the data will be re-ordered, and the value TRUE will be written here. If the data is not re-ordered, the value FALSE is written here. If this is NULL, then nothing is written here.

restr_names
    The array of pointers to restrictions names.

restr_values
    The array of restriction values.

num_restr
    The number of restriction values.

RETURN VALUE
A pointer to a colourmap on success, else NULL. The returned colourmap will contain <<*size>> contiguous packets which each contain first a red intensity, then a green and then a blue.

Multi-threading Level
Unsafe.

NOTE
NULL pointers may be passed for <<restr_names>> and <<restr_values>> and <<num_restr>> set to zero. In this case, the routine will only return a colourmap if there is only one instance of a colourmap in the entire data structure.

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/