AVS Modules read_cmap Lawrence Berkeley Laboratory 16 Aug 1993 NAME read_colormap SUMMARY Name read_colormap Type data Inputs none Output colormap Parameters Name Type Default Filename string NULL DESCRIPTION This module reads an ASCII file consisting of a list of red, green, blue, alpha values that are used to create a colormap. The first line of the file is an integer which is the number of colors in the colormap. Following this is one line with four floating point numbers for each entry in the colormap. Finally there is one line with two floats specifying the upper and lower bounds for mapping. The 0th element in the aray maps to min, and the num_colors'th element maps to max. Blank lines and any text after a # character is ignored. #This is the start of the file num_colors # integer r g b a # floating point values r g b a # This is a comment. . . r g b a min max #comments or blank lines PARAMETERS Filename A file browser is supplied allowing the user to specify a filename for read_colormap to read. OUTPUTS A colormap of the size specified in the input file. EXAMPLE READ COLORMAP READ FIELD | | -----------| | ARBITRARY SLICER | GEOMETRY VIEWER LIMITATIONS Limited error checking is performed. AVS Modules read_colormap Lawrence Berkeley Laboratory 16 Aug 1993