Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  ENVI Classic Display  >  DISP_GOTO

DISP_GOTO

DISP_GOTO

This routine only works with ENVI Classic display groups and cannot be used with the ENVI display or in code that starts the application with the ENVI function.

Use this procedure to move a currently selected pixel to a new location in a display group. The Zoom window will also be moved, so that it is centered on the new current pixel location. If the new current pixel location is not within the current Image window, the Image and Scroll windows will be moved so that they include the new current pixel.

Note: An interactive ENVI Classic session is required to run this procedure.

Syntax


DISP_GOTO, DN, XFLOC, YFLOC [, /NO_WARN]

Arguments


DN

This keyword cannot be used to reference the ENVI display. It is only for use with ENVI Classic display groups.

This is the display number corresponding to an open display group. Display numbers (DNs) are zero-based; ENVI Classic Display #1 corresponds to DN=0. You can retrieve DNs in the event handler of user-managed display events. For example, use the following code to retrieve the uvalue for ev.top:

widget_control, ev.top, get_uvalue=dn

XFLOC

This is a named variable that contains the x location of the current pixel in zero-based file coordinates.

YFLOC

This is a named variable that contains the y location of the current pixel in zero-based file coordinates.

Keywords


NO_WARN (optional)

Set this keyword if you do not want an error message printed when the (XFLOC, YFLOC) location is invalid for the currently displayed image. For example, if the image is (512, 512) and you specify (700, 700), an error message will be printed, unless you set /NO_WARN.

Example


The following example moves the current pixel in the first display by 10 pixels in the X and Y directions.

PRO EXAMPLE_DISP_GOTO  
  compile_opt IDL2
  ;   
  ; Get all the display numbers and   
  ; check to make sure at least one
  ; display is present.
  ;  
  display = envi_get_display_numbers()  
  if (display[0] eq -1) then return  
  ;
  ; Move the first display ten pixels
  ; in X and Y.  
  ;
  disp_get_location, display[0], xloc, yloc  
  disp_goto, display[0], xloc+10, yloc+10
END

API Version


3.2



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