Most LAS programs, being sequential image processing routines, have structures (or flows) very similar to each other. Images will be read, the pixel values modified in some way, and new images created from the modified pixels. Thus, a basic program structure can be defined. A program initializes LAS and gets parameters from the terminal monitor. It then opens input and output images. The program processes the data, and when finished, closes the files. It then copies history records, updates the DDR file, saves the min/max values, and ends.
initialize TAE and LAS (c_inlas()) retrieve TAE parameter values (xr routines/p_find) get input image information (c_getin()) get output image name (c_getout()) open input images (c_eopens()) open output image (c_eopens()) allocate memory for images ('C' only) (c_ealloc()) group images (c_egroup()) if min max values are to be computed initialize min and max values (c_inmnmx()) initialize processing message utility(c_inittm()) enable processing message utility (c_startm()) for each image line read/write one image line (c_estep()) for each band create output pixels from input pixels (c_px or other routines) if min max values are to be computedc_pxmnmx()) end-for end-for
write last image line to output image (c_estep()) disable processing message utility (c_stoptm()) close all image files within group (c_egclse()) create/update history associated file (c_hstout()) update DDR file (c_upddr()) save min and max values (c_svmnmx()) output a completion message (c_complt()) end-program