>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  IMG_DISP

IMG_DISP

IMG_DISP

Name


      IMG_DISP

Purpose


      Display a given image.

Category


Calling Sequence


      img_disp, img

Inputs


      img = Input image. in
        2-d array, 3-d array, or file name.
        May also be an existing window index.
        A 1-D array is treated like a NX x 1 or 1 x NY array.
        A 1-D color image has dimensions n,1,3 in any order. If
        the 1 is last it may be lost, add it back using reform.

Keyword Parameters


Keywords


        /SCALE Bytescl image for display.
        MAG=mag Mag factor (def=1).
        SMAG=smag Like MAG but smooth image first if smag LE 0.5
          mag or smag may be 2-d for x and y mag factors,
          in that case any embedded scaling will be ignored.
        ROTATE=rot as used by the IDL ROTATE function (0-7).
        REBIN_MAG=rmag Use rebin to change the original image
          dimensions before doing a rotate or mag or smag.
          This mag factor, rmag, is applied to both dimensions.
        TITLE=ttl Image window title. Defaults to name and size.
          Can change later: if current window do:
          widget_control,swinfo(/base),base_set_title=newtitle
        /ADDSIZE means image size to end of title text.
        /CURRENT Use current window if correct size.
          May also say CURRENT=n to look back n windows for
          a size match.
        /NOSHOW Means do not bring window to the front.
        WINDOW=win Specify which window to use. If it does not
          exist then make it. TITLE only works for new windows.
        /ORDER display the image reversed in Y.
        XPOS=x, YPOS=y Optional window position.
        X_SCR=x_scr X size of scrolling region.
        Y_SCR=y_scr Y size of scrolling region.
          Def = up to 90% of screen size.
        /SMALL Use a smaller window.
        /PIXMAP means use a pixmap.
        GROUP_LEADER=grp specified group leader. When the
          group leader widget is destroyed this widget is also.
        INFO=info Embedded scaling info in a structure (null if none).
        ERROR=err error flag: 0=ok, 1=not 2-D or 3-D,
          2=wrong number of color channels for 3-D array.
          3=file not read.

Outputs


Common Blocks


Notes


      Note: Normally used for byte images but may also be
        be used for INT and UINT images. These will scale
        -32768 to 32677 and 0 to 65536 to 0 to 255 for display.
        So even if an INT image is already 0 to 255 it will
        not display correctly without /SCALE. To manually
        scale a flag image (0,1) use *255B.
        Displays in an swindow (scrolling window widget).
        Can delete using swdelete.

Modification History


      R. Sterner, 2002 Jun 03
      R. Sterner, 2002 Jun 11 --- Allowed INT and UINT images.
      R. Sterner, 2003 Mar 13 --- Added XPOS, YPOS, X_SCR, Y_SCR keywords.
      R. Sterner, 2003 Mar 21 --- Added GROUP_LEADER.
      R. Sterner, 2003 Apr 02 --- Always use swindow (allows title change).
      R. Sterner, 2003 Apr 21 --- Allowed CURRENT=n to match last n windows.
      R. Sterner, 2003 Apr 21 --- Can add image size to title.
      R. Sterner, 2004 May 20 --- Added window index to default title.
      R. Sterner, 2005 Jan 17 --- Added /pixmap.
      R. Sterner, 2006 Jan 25 --- Added /quiet to swindow call.
      R. Sterner, 2006 Jan 25 --- Allowed x and y mag factors.
      R. Sterner, 2006 Mar 16 --- Fixed bug in trying to set title for a
      normal window (not swindow).
      R. Sterner, 2007 May 08 --- Added /SCALE.
      R. Sterner, 2007 Oct 18 --- Added WINDOW=win.
      R. Sterner, 2007 Nov 08 --- Added /NOSWIN.
      R. Sterner, 2008 Jan 25 --- Added ROTATE=rot.
      R. Sterner, 2008 Mar 27 --- Added REBIN_MAG=rmag.
      R. Sterner, 2008 May 15 --- Added var name to title if interactive.
      R. Sterner, 2008 Jun 24 --- Made scale apply to image or file.
      R. Sterner, 2008 Jun 25 --- Allowed existing window index.
      R. Sterner, 2008 Jul 01 --- Noted INT images in help text.
      R. Sterner, 2008 Sep 29 --- Ignored NaN for /SCALE.
      R. Sterner, 2010 Feb 22 --- Added set_scale and map_set_scale.
      R. Sterner, 2010 Feb 23 --- Embedded info in a structure (null if none).
      R. Sterner, 2010 Apr 09 --- Changed SCINFO to INFO.
      R. Sterner, 2010 May 07 --- Converted arrays from () to [].
      R. Sterner, 2010 Sep 08 --- Now allows 1-D arrays (B&W or Color).
      R. Sterner, 2011 Mar 10 --- Changed /NOSWIN to /SMALL and made default.
      R. Sterner, 2011 Mar 10 --- Added /NOSHOW.
      R. Sterner, 2013 Jan 10 --- Allowed extra dimensions of 1.
      R. Sterner, 2014 Jun 30 --- Fixed GROUP_LEADER to work.
  Copyright (C) 2002, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us