ColorTrixDoc.tioga
Jules Bloomenthal, January 10, 1986 5:02:24 pm PST
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
ColorTrix
a collection of programs for modifying the color display
Jules Bloomenthal
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: A collection of programs for modifying the color display have been written with an emphasis on interactivity through the command tool and speed of image processing. The color display is treated simply as a frame buffer, with no regard to the placement of viewers on the display.
Keywords: color display, color map, frame buffer.
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Software Environment
Bringover -p /Cedar/CedarChest6.0/Top/ColorTrix.df.
For programming, refer to:
ColorTrixBasics.mesa for basic low level access to the color display,
ColorTrixFile.mesa for file transfer between the color display,
ColorTrixPalette.mesa for palette drawing and undrawing procedures,
ColorTrixPix.mesa for creation of full frame images on the color display,
ColorTrixMod.mesa. for modification of images currently in the color display.
ColorTrixMap.mesa for color map modification and creation procedures.
Color Map Program Summaries
The following programs all operate on the color map of the color display. In general, color map entry zero is not modified, rmaining usually at [0, 0, 0]. Values for red, green, or blue color map entries should be within [0..255].
CmEdit   Edit the color map.
CmSave <name>  Save the color map in the named file.
CmLoad <name>  Load the named color map .
CmMono   Set the color map to be a linear ramp from 0 through 255.
CmGamma [value]  Put a gamma-corrected grayscale in the color map; if no argument
   is given, then a slider is displayed for interaction.
CmRamp <i0 r0 g0 b0 i1 r1 g1 b1: NAT>
   Create a linear ramp from entry i0 through i1 in the color map.
CmPrint   Print the color map entries as three columns (r, g, and b).
CmOnly [red | green | blue] Enable only the specified primary in the color map.
CmTents [nTents: NAT] Create nTents number of linear sawtooths in the color map.
CmSin [nCycles: REAL] Create nCycles cycles of sine wave in the color map.
CmGauss   Put a gaussian curve in the color map.
CmColor <i r g b: NAT] Set color map entry i to (r, g, b).
CmCycle   Continuously circularly shift the color map.
CmNBits <nBits: NAT] Display only nBits [0..8] number of bits in the color map.
CmScale <s: REAL>  Scale the color map entries by s; results are clipped to [0..255].
CmAdd <a: INTEGER> Bias the color map entries by a; results are clipped to [0..255].
CmCompose <c1 c2: name> Compose c1 with c2 (result ← c2[c1]).
CmInterp <t: REAL, c: name> Interpolate the current color map with the named map
    (result ← (1.0-t)*name+t*current).
CmScramble  Randomly interchange color map entries.
CmRandom  Fill the color map with random values.
CmShift   Circularly shift the color map by n, if given; if not given, then
   a slider is displayed for interaction.
CmSpeckle  Randomly set color map entries to random values.
CmFlash   Continuously fill the color map with random values.
CmHyp   Hypnotic hack.
CmSnake   Snake through color space.
Color Display Program Summaries
The following programs all relate to the image displayed on the color display. In general, it is a good idea to manually turn on the color display (with the ``Color'' button) before using any of these programs. All color display creation and modification operations take place within the active window, as determined by the default color display dimensions or the SetWindow command. Most of the programs will accept command line arguments of the form "-w x0 x1 y0 y1" where x0, x1, y0, and y1 are integers defining a window which overrides that set by SetWindow.
SetWindow x1 x2 y1 y2: NAT Set the active window to the given values.
ResetWindow  Set the active window to be the default color display dimensions.
PrintWindow  Print the active window dimensions.
Pal [nRows: NAT] [-s] Display the color map as a palette, excepting entry 0;
   -s for smooth display, otherwise, small blocks for each entry.
UnPal   Remove the palette.
Negate   Negate the image.
Reflect [h|v]  Reflect the image around the horizontal (h) mid-line or
   the vertical (v) mid-line. h is the default.
Mirror [l|r|t|b]  Mirror the image from left to right (l), right to left (r),
   top to bottom (t), or bottom to top (b). b is the default.
Left <nPixels: INT>  Circularly shift the image to the left; if nPixels < 0, shifts right.
Up <nPixels: INT>  Circularly shift the image up; if nPixels < 0, shifts down.
Clear [pixelValue: NAT> Clear the color display; default pixelValue is 0.
Lum   Convert pseudo-color to luminance.
Ramp [h|v]  Create a horizontal (h) or vertical (v) ramp; v is the default.
Pie   Create a radially symmetric pattern, tapering outwards in intensity.
PVal <new> [old1 old2 . . .] Set those pixels equal to old1 or old2 to new.
See Also
/Cedar/CedarChest6.0/Top/ColorDisplay.df.