procedure rpbuild (xlo, xhi, ylo, yhi) int xlo =1 {min=1, max=32768, prompt="x_start"} int xhi =1 {min=1, max=32768, prompt="x_end"} int ylo =1 {min=1, max=32768, prompt="y_start"} int yhi =1 {min=1, max=32768, prompt="y_end"} int pln =0 {min=0, max=7, prompt="image plane (N-dim images)"} string imrpstr ="" {prompt="output image region/plane string"} # @(#) task rpbuild Author: R.A. Jansen -- December 2 2000 # @(#) # @(#) task to construct an image region/plane string of generic format # @(#) [pln][xlo:xhi,ylo:yhi], where the image plane is optional (=0). # @(#) The constructed string is returned as task parameter 'imrpstr'. begin string cstr int x1, x2, y1, y2, ip x1 = xlo x2 = xhi y1 = ylo y2 = yhi ip = pln if ( ip == 0 ) { cstr = "[" } else { cstr = "["//str(ip)//"][" } cstr = cstr//str(x1)//":"//str(x2)//","//str(y1)//":"//str(y2)//"]" # Update task parameters... imrpstr = cstr end