The following is the completed ENHANCE script, including built-in online documentation and status report. In general, EASI scripts should follow the same overall structure. Note that while it is a great improvement over manually entering commands, the ENHANCE script is still limited in that it follows a rigid linear control flow and lacks any error handling. However, capabilities such as control flow to produce more complex procedures and advanced error handling may be added using the more advanced features of EASI discussed in later sections.
! ENHANCE.EAS: image resizing and enhancement DOC DOC ENHANCE DOC DOC Given an input file and channel number, create a new DOC file containing a 512x512 sized copy of the input with DOC equalization enhancement applied. DOC DOC 1 PARAMETERS DOC DOC ENHANCE requires the following input parameters: DOC DOC Name Prompt Count Type DOC DOC FILI Name of input file to be processed 1-64 Char DOC DBIC Database Input File Name 0-1 Int DOC FILO Name of output file to be created 1-64 Char DOC DOC 2 FILI DOC DOC The name of the input file from which data will be enhanced. DOC DOC 2 DBIC DOC DOC The channel within the input file which is to be enhanced. DOC DOC 2 FILO DOC DOC The new file to create which will be of size 512x512, and contain DOC a single channel with the enhanced (by equalization) input data. DOC DOC 1 EXAMPLE DOC DOC Enhance the contents of channel 3 of a file called "File2Enhance.pix", DOC creating and putting the results in a file called "EnhancedFile.pix". DOC DOC FILI = "File2Enhance.pix" DOC DBIC=3 DOC FILO= "EnhancedFile.pix" DOC DOC RUN ENHANCE DOC_END STATUS_TITLE "ENHANCE Image Resizing and Enhancement" STATUS_SHOW FILI 64,1 STATUS_SHOW DBIC 1,1 STATUS_SHOW FILO 64,1 STATUS_END ! Set parameters for the CIM task FILE = FILO TEX1 = "Down-sampled image" TEX2 = DBSZ = 512, 512 PXSZ = 1, 1 DBNC = 1 DBLAYOUT = "BAND" ! execute the CIM task to create and allocates space for a new ! PCIDSK database file, for storing image data. RUN CIM ! Set parameters for the III task ! FILI, FILO and DBIC are already set by user DBOC = 1 DBIW = DBOW = ! execute the III task to transfers image data to the newly created ! image database file RUN III ! Set the parameters for the FUN task to generate a lookup table ! to enhance the image using "Equalization" enhancement FILE = FILO FUNC = "EQUA" DBIC = 1 DBLUT = DBSN = "Equalize" DBSD = "Equalization enhancement" OSTR = SDPT = TRIM = MASK = DBHC = ! execute the FUN task too generate a lookup table RUN FUN ! The fun task creates a data segment, the number of which ! is recorded in the parameter LASC. ! Set the parameters for the LUT task FILE = FILO DBIC = 1 DBLUT = LASC DBOC = 1 MASK = ! execute the LUT task to enhance new image on disk by passing it ! through the created in previous step an 8-bit Lookup Table segment RUN LUT
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.