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 output an image to a PostScript file.

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

Syntax


DISP_OUT_IMG [, ANN_COLOR=integer] [, ANN_NAMES=string array] [, BORDER=array] [, BPP={1 | 2 | 4 | 8}], /COLOR, DIMS=array, FID=file ID, /LAND, OUT_NAME=string, POS=array, PSIZE=array, REBIN=value, XOFF=value, XSIZE=value, YOFF=value, YSIZE=value

Keywords


ANN_COLOR (optional)

Use this keyword to specify the gray scale level for graphical overlays when outputting to gray scale. ANN_COLOR is a single integer value from 0 to 255 (inclusive). The default value is 0.

ANN_NAMES (optional)

Use this keyword to specify an array of saved annotation filenames. Each will overlay on the output image.

BORDER (optional)

Use this keyword to specify a two-element array of x and y border sizes (in inches).

BPP (optional)

Use this keyword to specify the number of bits per pixel in the PostScript output. Valid values are 1, 2, 4, or 8.

COLOR

Set this keyword for color output. You must also set the POS and FID keywords accordingly.

DIMS

The “dimensions” keyword is a five-element array of long integers that defines the spatial subset (of a file or array) to use for processing. Nearly every time you specify the keyword FID, you must also specify the spatial subset of the corresponding file (even if the entire file, with no spatial subsetting, is to be processed).

  • DIMS[0]: Unused for this routine; set to -1L.
  • DIMS[1]: The starting sample number. The first x pixel is 0.
  • DIMS[2]: The ending sample number
  • DIMS[3]: The starting line number. The first y pixel is 0.
  • DIMS[4]: The ending line number

To process an entire file (with no spatial subsetting), define DIMS as shown in the following code example. This example assumes you have already opened a file using ENVI_SELECT or ENVI_PICKFILE:

envi_file_query, fid, dims=dims

FID

Use this keyword to specify an array of file IDs. If COLOR=1 (color is enabled), set this keyword as FID=[FID, FID, FID].

LAND

Set this keyword for landscape output. The default is portrait output.

OUT_NAME

Use this keyword to specify a string with the output filename for the PostScript file.

POS

Use this keyword to specify an array of band positions for each of the files specified by the FID array. If COLOR=1 (color is enabled), set this keyword as POS=[0L, 1, 2].

PSIZE

Use this keyword to specify a two-element array indicating the paper size in inches, for example: [8.5, 11].

REBIN

Use this keyword to specify a REBIN factor to apply to the data. Values less than 1 enlarge the data, and values greater than 1 reduce the data.

XOFF

Use this keyword to specify the x offset (in inches) from the left side of the output.

XSIZE

Use this keyword to specify the x size of the output.

YOFF

Use this keyword to specify the y offset (in inches) from the top of the output.

YSIZE

Use this keyword to specify the y size of the output.

Example


PRO EXAMPLE_DISP_OUT_IMG  
  compile_opt IDL2
  ;
  ; First restore all the base save files.  
  ;
  envi, /restore_base_save_files  
  ;  
  ; Initialize ENVI and send all errors
  ; and warnings to the file batch.txt
  ;  
  envi_batch_init, log_file='batch.txt'  
  ;  
  ; Open the input file  
  ;
  envi_open_file, 'bhtmref.img', r_fid=fid  
  if (fid eq -1) then begin    
     envi_batch_exit
     return
  endif
  ;  
  ; Set the POS keyword to select the first band
  ; in the file.  
  ;
  envi_file_query, fid, dims=dims  
  pos = [0]  
  ;  
  ; Call the output routine.
  ;
  disp_out_img, $
     fid=fid, dims=dims, pos=pos, $    
     bpp=8, color=0, land=0, psize=[8.5,11], $    
     out_name='test.ps', rebin=1., $
     xoff=.25, yoff=.25, xsize=5., ysize=5.  
  ;
  ; Exit ENVI  
  ;  
  envi_batch_exit
END

API Version


4.2