>  Docs Center  >  Libraries  >  CATALYST  >  CT_STRETCH__DEFINE
Libraries

CT_STRETCH__DEFINE

CT_STRETCH__DEFINE

Name


      CT_STRETCH__DEFINE

Purpose



      The purpose of this routine is to implement a colortable stretch
      widget for images. Essentially, it allows the use to window/level
      an image with respect to its display colors. No image data is changed.

Authors



        FANNING SOFTWARE CONSULTING BURRIDGE COMPUTING
        1645 Sheely Drive 18 The Green South
        Fort Collins Warborough, Oxon
        CO 80526 USA OX10 7DN, ENGLAND
        Phone: 970-221-0438 Phone: +44 (0)1865 858279
        E-mail: davidf@dfanning.com E-mail: davidb@burridgecomputing.co.uk

Category



      Objects.

Syntax



      tlb = Obj_New("TOPLEVELBASE")
      stretch = Obj_New('CT_STRETCH', tlb, Range=[0, 255])
      tlb -> Draw

Superclasses



      BASEWIDGET
      WIDGETATOM
      CATATOM
      CATCONTAINER
      IDL_CONTAINER

Class Structure



  class = { CT_STRETCH, $
            r: BytArr(256), $ ; The original red color vector.
            g: BytArr(256), $ ; The original green color vector.
            b: BytArr(256), $ ; The original blue color vector.
            c_bg: "", $ ; The name of the background color.
            c_border: "", $ ; The name of the border color.
            c_centhresh: "", $ ; The name of the center threshold color.
            c_maxthresh: "", $ ; The name of the maximum threshold color.
            c_minthresh: "", $ ; The name of the minimum threshold color.
            cenThresh: 0.0, $ ; The center of the threshold range.
            closeto: 0.0, $ ; A delta for establishing if you are "close" to a line.
            colors: Obj_New(), $ ; A colortool object for image colors.
            coords: Obj_New(), $ ; A coordinate object for the colorbar.
            drawID: Obj_New(), $ ; The draw widget object.
            format: "", $ ; The string text format.
            image: Obj_New(), $ ; The internal image that is displayed.
            lineToMove: "", $ ; A string identifying which line we should move. MIN, MAX, CENTER.
            maxThresh: 0.0, $ ; The maximum threshold.
            minThresh: 0.0, $ ; The minimum threshold.
            pixmapID: Obj_New(), $ ; The pixmap widget object.
            minTextID: Obj_New(), $ ; The minimum Text Widget.
            maxTextID: Obj_New(), $ ; The maximum Text Widget.
            range: FltArr(2), $ ; The range of the color table.
            INHERITS BASEWIDGET $ ; Inherits base widget capability.
          }

Messages



      A message with a title of 'CT_STRETCH_CHANGE is sent whenever there is a change in
      a histogram threshold line. The image object passed into the INIT method is automatically
      registered to receive these messages. The DATA passed with the message contains the
      minumum and maximum threshold values, like this:
        DATA={maxThresh:self.maxThresh, minThresh:self.minThresh}

Modification History



      Written by: David Fanning, 20 January 2004.
      Removed RETAIN=1 keyword on PIXMAPWIDGET to allow display on UNIX machines. 4 Jan 2008. DWF.



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