procedure blkzap( object, x1, y1, x2, y2 ) # procedure to mask out a rectangular region in images. Note that # this procedure runs on an object frame, but modifies the # BPM file named by the BPM header keyword! The user supplies # two diagonal corners of the regions to be masked out. # # Takes about 90 seconds / projected MOSAIC frame on Ultra-60 # # Arjun Dey (from James Rhoads' satzap.cl) # 08/04/99 string object { prompt="Input image"} real x1 { prompt="lower left corner: location 1 - X "} real y1 { prompt="lower left corner: location 1 - Y "} real x2 { prompt="upper right corner: location 2 - X "} real y2 { prompt="upper right corner: location 2 - Y "} begin string pdexp,x1s,y1s,x2s,y2s x1s=str(x1) y1s=str(y1) x2s=str(x2) y2s=str(y2) pdexp = "if ((x>="//x1s//")&&(x<="//x2s//")&&(y>="//y1s//")&&(y<="//y2s//")) then im1+1 else im1" print( pdexp ) imgets( object, "BPM" ) imcalc( imgets.value, imgets.value, pdexp, verbose+ ) end