(* Last edited on 1999-03-11 01:10:21 by stolfi *) INTERFACE Pixel3x3Window; IMPORT PGMImageFilter; TYPE T = ARRAY [-1..+1] OF ARRAY [-1..+1] OF Pixel; Pixel = PGMImageFilter.Pixel; LineBuffer = PGMImageFilter.PixelBuffer; INT = INTEGER; LONG = LONGREAL; NAT = CARDINAL; PROCEDURE Get( x, y: INT; READONLY imBuf: LineBuffer; NX, NY: NAT; VAR p: T; noPixel: Pixel := LAST(NAT); ); (* Extracts from "imBuf" the 3x3 sub-array centered on pixel "[x,y]". Fills non-existing elements with "noPixel". *) END Pixel3x3Window.