<<>> <> <> <> <> DIRECTORY ImagerPixel USING [PixelBuffer, PixelMap, PixelProc], ImagerSample USING [Function, maxVec, nullFunction, Sample, SampleMap, SampleBuffer, Vec, zeroVec], ImagerTransformation USING [ScanMode, Transformation], Prop USING [PropList], Rope USING [ROPE], SF USING [Box]; ImagerPixelArray: CEDAR DEFINITIONS ~ BEGIN Transformation: TYPE ~ ImagerTransformation.Transformation; ScanMode: TYPE ~ ImagerTransformation.ScanMode; Sample: TYPE ~ ImagerSample.Sample; SampleBuffer: TYPE ~ ImagerSample.SampleBuffer; SampleMap: TYPE ~ ImagerSample.SampleMap; PixelProc: TYPE ~ ImagerPixel.PixelProc; PixelBuffer: TYPE ~ ImagerPixel.PixelBuffer; PixelMap: TYPE ~ ImagerPixel.PixelMap; Vec: TYPE ~ ImagerSample.Vec; zeroVec: Vec ~ ImagerSample.zeroVec; maxVec: Vec ~ ImagerSample.maxVec; Function: TYPE ~ ImagerSample.Function; nullFunction: Function ~ ImagerSample.nullFunction; ROPE: TYPE ~ Rope.ROPE; maxCount: NAT ~ NAT.LAST; <> PixelArray: TYPE ~ REF PixelArrayRep; PixelArrayRep: TYPE ~ RECORD [ immutable: BOOL, samplesPerPixel: NAT, -- number of samples for each pixel sSize, fSize: INT, -- slow and fast dimensions (Interpress calls these xPixels, yPixels) m: Transformation, -- transforms [s, f] coordinates to "upright" [x, y] coordinates class: REF PixelArrayClassRep, -- class operations data: REF, -- instance data propList: Prop.PropList ¬ NIL ]; <> <> <<>> PixelArrayClassRep: TYPE; -- see ImagerPixelArrayPrivate ErrorDesc: TYPE ~ RECORD [code: ATOM, explanation: ROPE]; Error: ERROR [error: ErrorDesc]; GetClass: PROC [pa: PixelArray] RETURNS [ATOM]; <<... returns an ATOM that identifies the PixelArray's class.>> <<>> MaxSampleValue: PROC [pa: PixelArray, i: NAT] RETURNS [Sample]; <<... returns the maximum sample value for the ith sample.>> <> <> <<>> Get: PROC [pa: PixelArray, i: NAT ¬ 0, s, f: INT] RETURNS [Sample]; <<... returns the sample value with indices [i, s, f].>> <> GetSamples: PROC [pa: PixelArray, i: NAT ¬ 0, s, f: INT ¬ 0, buffer: SampleBuffer, start: NAT ¬ 0, count: NAT ¬ maxCount]; <<... fetches a run of samples into a buffer. The effect is:>> <> <> <> <> GetPixels: PROC [pa: PixelArray, s, f: INT ¬ 0, pixels: PixelBuffer, start: NAT ¬ 0, count: NAT ¬ maxCount]; <<... fetches a run of pixels into a buffer. The effect is:>> <> <> <> <> Transfer: PROC [pa: PixelArray, i: NAT ¬ 0, s, f: INT ¬ 0, dst: SampleMap, dstMin: Vec ¬ zeroVec, size: Vec ¬ maxVec, function: Function ¬ nullFunction]; <<... like ImagerSample.Transfer, where the pixel array is the source.>> <> <> Copy: PROC [pa: PixelArray] RETURNS [PixelArray]; <<... makes an immutable copy of a pixel array; returns pa if pa.immutable.>> Extract: PROC [old: PixelArray, samplesPerPixel: NAT, select: PROC [NAT] RETURNS [NAT]] RETURNS [new: PixelArray]; <<... extracts selected sample layers from a pixel array.>> <> <> <> <> <> <> Join: PROC [list: LIST OF PixelArray] RETURNS [PixelArray]; Join3: PROC [pa1, pa2, pa3: PixelArray] RETURNS [PixelArray]; <<... joins multiple sample planes into one PixelArray.>> <> <<>> FromPixelMap: PROC [pixelMap: PixelMap, box: SF.Box, scanMode: ScanMode, immutable: BOOL ¬ FALSE] RETURNS [PixelArray]; <> <> <> <> END.