>  Docs Center  >  Libraries  >  Buie  >  IMAGECT
Libraries

IMAGECT

IMAGECT

Name


  imagect

Purpose (one Line Only)


  Convert a byte image to a rgb image using a standard color table

Description


  This tool lets you re-create the illusion of using decomposed color
    that was our only option many years ago. 24-bit color is generally
    a lot more useful but false color image display is still handy. The
    result of this function is to return a 3-plane rgb color image where
    the input byte image has been converted to rgb according to intensity
    into the chosen color table.

Category


  Image display

Calling Sequence


  result=imagect(image,table)

Inputs


  image - Byte scaled image to convert
  table - IDL standard color table number
            -or-
          A string which is the name of a local color table in your
          path. These files are compatible with cpalette.pro. The files
          are named color.<table>.dat. If you give the table name it will
          be loaded. However, not all of these local color tables have
          256 colors. Those that are not are expanded by replication to
          this length meaning some indexes will be duplicated.

Optional Input Parameters


Keyword Input Parameters


  BLACK - Flag, if set will replace the first color in the lookup table
            with black so that 0 in the image comes out as black on the
            display. The lookup table itself is not modified, only
            the resulting output.

Outputs


  return value is a [nx,ny,3] byte cube where nx,ny is the size of the
    input image.

Keyword Output Parameters


Common Blocks


  Makes use of mwb_palette_com managed by cpalette.pro

Side Effects


  If you use a local palette, the loaded (and thus default) palette may
    change.

Restrictions


Procedure



  Here's an example. Given "image" is a byte-scaled image (use bytscl
    ahead of time if you need to):
  tv,imagect(image,34,/black),true=3
  This creates a false-color image where intensity has been mapped to color
    using the Rainbow2 standard IDL color table. (see loadct documentation
    for a list of color tables).

Modification History


  2015/11/08, Written by Marc W. Buie, Southwest Research Institute
  2016/01/12, MWB, added option of local color tables.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us