.help mkcolor mar00 ftools.mkcolor
.ih 
NAME
mkcolor -- generates true color image
.ih
USAGE
mkcolor rfile gfile bfile outfile cutmode [rmin rmax gmin gmax bmin bmax]
.ih
DESCRIPTION

   This task generates an encoded color image from three images
   representing the red, green, and blue components.  By default a base
   of 6 is used in the encoding.  Each component image is remapped to
   values limited by the base and dependent on the cutmode.  For
   example, with the default base of 6, each pixel will be assigned a
   value from 0 to 5.  If the cutmode is HISTogram, a histogram
   equalization is used to assign intensity values.  If the cutmode is
   LINEAR, the values will be scaled linearly from [rgb]min to
   [rgb]max.  If the cutmode is LOG, the values will be scaled logarithmically
   from [rgb]min to [rgb]max. If a MAXCOL cutmode is used, the maximum value 
   for an individual pixel from the three component images is used as the
   maximum intensity, and the other two colors are scaled relative to
   the that maximum and [rgb]min.

   If IR, IG, and IB represent the red, green, and blue intensities
   of an individual pixel, respectively, the pixel output image  
   has the value: IR + IG*base + IB*base*base.

.ih
PARAMETERS
.ls rfile [filename]
Location of file for red component.
.le
.ls gfile [filename]
Location of file for green component.
Must be same size as rfile.
.le
.ls bfile [filename]
Location of file for blue component.
Must be same size as rfile.
.le
.ls outfile [filename]
Location of the output image file. The header from rfile is copied
into the output file.
.le 
.ls cutmode (HIST, LINEAR, LOG, or MAXCOL) [string]
Method used to cut intensities.  HIST = histogram equalization, LINEAR =
linear scaling between [rgb]min and [rgb]max, LOG = logarithmic
scaling between [rgb]min and [rgb]max, MAXCOL = linear scaling
based on maximum color.
.le
.ls (rmin = min in rfile) [real]
Minimum value used from rfile.  Unused for cutmode=HIST.
.le
.ls (rmax = max in rfile) [real]
Maximum value used from rfile.  Unused for cutmode=HIST.
.le
.ls (gmin = min in gfile) [real]
Minimum value used from gfile.  Unused for cutmode=HIST.
.le
.ls (gmax = max in gfile) [real]
Maximum value used from gfile.  Unused for cutmode=HIST.
.le
.ls (bmin = min in bfile) [real]
Minimum value used from bfile.  Unused for cutmode=HIST.
.le
.ls (bmax = max in bfile) [real]
Maximum value used from bfile.  Unused for cutmode=HIST.
.le
.ls (base = 6) [integer]
Base of color encoding.
.le
.ls (tchat = 10) [integer]
Set terminal chattiness.
.le 
.ls (lchat = 0) [integer]
Set log file and chattiness in the log file: = 0 the log file is 
not written.
.ls (clobber = no) [boolean]
If true,  an  existing  file  with  the  same  name  as  the
requested output file will be overwritten.
.le
.ih
EXAMPLES
.nf
 1- Generate color image with histogram equalization cut of intensities

   > mkcolor red.img blue.img green.img out.img sclmode=hist

 2- Generate color image with linear cut of intensities in base 8

   > mkcolor red.img blue.img green.img out.img sclmode=lin
       rmin=1 rmax=12 gmin=1 gmax=12 bmin=1 bmax=12 base=8
.fi
.ih
SEE ALSO
mkhrimg
