;+ ; NAME file_poly ; ; FUNCTION Read polygon vertex pixel coordinates from a disk file. ; ; HISTORY Andrew L. Stanger 5 February 1999 ; 18 Feb 1999: Write pvfile name to log file. ;- PRO file_poly, xdim_cme, ydim_cme, $ aoinum, logfile, pvfile, xv, yv, nver, polypix pvfile = '' ;--- Request polygon vertex file name. print, 'Enter name of file containing polygon vertices: ' read, pvfile ;--- Read polygon vertices pixel coordinates. fetch_poly, pvfile, xv, yv, nver ;--- Read polygon vertex file. ;--- Write Region information into log file. OPENW, lulog, logfile, /GET_LUN PRINTF, lulog, 'File-Specified Polygon Region: ', $ STRING (aoinum, FORMAT='(I3)') PRINTF, lulog, 'polygon vertex file: ', pvfile CLOSE, lulog FREE_LUN, lulog ;--- Determine coordinates of all pixel within polygon area. polypix = POLYFILLV (xv, yv, xdim_cme, ydim_cme) ;--- pixels in polygon. ;--- Draw polygon perimeter. PLOTS, xv, yv, color=253, /DEVICE PLOTS, xv [0], yv [0], color=253, /DEVICE, /CONTINUE RETURN END