procedure tdisplay (imgFile,abbName,extn,useImexam,imexFile,appImex,imexFlds,nl, strtFrm,rollFrames) string imgFile {prompt="List of images (full or abbreviated names)"} bool abbName {no, prompt=" Are image names abbreviated?"} string extn {prompt=" Extension appended to abbreviated image names"} bool useImexam {yes, prompt="Use imexam on each image displayed?"} string imexFile {"imexam.out", prompt=" Textfile logging imexam output"} bool appImex {no, prompt=" Append imexam output to existing file?"} string imexFlds {"1-", prompt=" Imexam fields logged (1- | 1 | 1-3 etc)"} int nl {3, prompt="Number of lines (from the tail) to show each time"} int strtFrm {1, prompt="Ximtool frame into which first image is displayed"} bool rollFrames {yes, prompt="Display successive images in a fresh frame?"} struct *flist # list-directed structure begin # Variable Declarations: string rawName # raw (abbreviated) image name string fullName # full image name int j # frame counter string action # action command entered at run time if (! defpac ("images")) { print("Package IMAGES needs to be loaded.") bye } delete (files="temp_*",go_ahea+,ver-) if (appImex==no) { delete (files=imexFile,go_ahea+,ver-) } # Main image loop: ------------------------------------------------- flist = imgFile j = strtFrm while ( fscan(flist, rawName) != EOF) { if (abbName==yes) { fullName=rawName//extn } if (abbName==no) { fullName=rawName } display (image=fullName,frame=j,erase+,bord-, sele+,repe-,fill-,zscal+,ztrans="linear", >> "temp_junk.out") print (" ") print (" *** "//fullName//" displayed in Ximtool frame "//j//" ***") if (useImexam==yes) { delete (files="temp_imexam.jnk",go_ahea+,ver-) print (" ") print (" --> Use imexam commands now and type when done.") imexam(input=fullName,frame=j,image=fullName,keeplog-,defkey="a",autor+, allfram+,nfram=0,graphcu="",imagecu="",wcs="logical",graphic="stdgraph", display="display(image='$1',frame=$2)",use_dis+,flpar-, >> "temp_imexam.jnk") print(fullName, >> imexFile) fields (files="temp_imexam.jnk",fields=imexFlds,lines="1-9999",quit_if-, print_f-, >> imexFile) print (" ") tail (input_fi=imexFile,nlines=nl) } print (" --> Type to display next image; to quit.") scan (action) if (action=="q") { print(" ") print(" ") print(" Quitting before end of list is reached ...") print(" ") print(" Done.") bye } if (action!="n") { print (" --> Type to display next image; to quit.") scan (action) } print (" ") if (rollFrames==yes) { j=j+1 if (j>4) {j=j-4} } } # ------------------------------------------------------------------ delete (files="temp_*",go_ahea+,ver-) print(" ") print(" ") print(" All done.") end