>  Docs Center  >  Libraries  >  CATALYST  >  SCALEIMAGE__DEFINE
Libraries

SCALEIMAGE__DEFINE

SCALEIMAGE__DEFINE

Name


      SCALEIMAGE__DEFINE

Purpose



      The purpose of this routine is to provide a CATIMAGE object that can be scaled or
      stretched. The algorithm for scaling is similar to this (linear scaling is shown):
          image = ORIGINAL_IMAGE
          i = WHERE(image EQ MISSING_VALUE, count)
          IF count GT 0 THEN image[i] = !Values.F_NAN
          scaledImage = BytScl(image, MIN=SCLMIN, MAX=SCLMAX, TOP=NCOLORS-1, /NAN) + BOTTOM
          IF count GT 0 THEN scaledImage[i] = MISSING_INDEX
         
      Scaling or stretching types include: linear, 2% linear, gamma, log, hyperbolic sine,
      square-root, equilization, and gaussian. See this article for additional information:
     
          http://www.dfanning.com/ip_tips/xstretch.html
     
      Scaling only applies to 2D images. True-color images are not scaled and none
      of the scaling parameters apply to them.

Authors



        FANNING SOFTWARE CONSULTING
        1645 Sheely Drive
        Fort Collins
        CO 80526 USA
        Phone: 970-221-0438
        E-mail: davidf@dfanning.com

Category



      Objects.

Syntax



      theObject = Obj_New("SCALEIMAGE")

Superclasses



      CATIMAGE
      CATATOM
      CATCONTAINER IDLITCOMPONENT
      IDL_CONTAINER

Class Structure



  class = { SCALEIMAGE, $
            bottom: 0, $ ; The lowest value in the image.
            missing_color: "", $ ; The name of a missing color.
            missing_value: Ptr_New(), $ ; The missing value in the image.
            missing_index: 0, $ ; The color index for missing color in scaled image.
            ncolors: 0, $ ; The number of colors to display the image in.
            sclmin: 0.0D, $ ; The minimum scale value.
            sclmax: 0.0D, $ ; The maximun scale value.
            gamma: 0.0D, $ ; The gamma scale factor.
            beta: 0.0D, $ ; The beta scale factor.
            mean: 0.0D, $ ; The mean scale factor.
            negative: 0, $ ; Take the reverse of the stretch.
            exponent: 0.0, $ ; The exponent scale factor.
            scaletype: 0, $ ; The type of scaling.
            sigma: 0.0, $ ; The sigma scale factor.
            INHERITS CATIMAGE $
          }

Messages



  None.

Modification History



      Written by: David Fanning, 27 July 2006.
      Modified the CreateDisplayImage to allow image display in PostScript. 7 November 2009. DWF.
      Refactored CreateDisplayImage in superclass CatImage to two new methods:
      CheckMultiPlotPosition and CheckKeepAspectRatio. 7 November 2009. DWF.
      Modified the program to better handle missing data values and to straighten out
          some confusing documentation and inconsistent usage of MISSING_COLOR. 15 July 2010. DWF.
      More work on correct usage of MISSING_COLOR and MISSING_INDEX keywords and
          properties. 28 July 2010. DWF.
      Still more bugs in the MISSING_COLOR, MISSING_INDEX, and MISSING_VALUE keyword
          handling. Tested more extensively, and passing all current tests. 10 October 2010. DWF.
      Error searching for missing value. Was using FINITE(missing_value) and I should have
          been using PTR_VALID(missing_value). 25 October 2010. DWF.



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