<> <> <> <> DIRECTORY Atom USING [PropList], ImagerSample USING [Function, maxVec, nullFunction, PixelBuffer, PixelMap, PixelProc, Sample, SampleMap, SampleBuffer, Vec, zeroVec], ImagerTransformation USING [ScanMode, Transformation], Rope USING [ROPE]; 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 ~ ImagerSample.PixelProc; PixelBuffer: TYPE ~ ImagerSample.PixelBuffer; PixelMap: TYPE ~ ImagerSample.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: Atom.PropList _ NIL ]; <> <> <<>> PixelArrayClassRep: TYPE; -- see ImagerPixelArrayPrivate ErrorDesc: TYPE ~ RECORD [code: ATOM, explanation: ROPE]; Error: ERROR [error: ErrorDesc]; GetClass: PROC [self: PixelArray] RETURNS [ATOM]; <<... returns an ATOM that identifies the PixelArray's class.>> <<>> MaxSampleValue: PROC [self: PixelArray, i: NAT] RETURNS [Sample]; <<... returns the maximum sample value for the ith sample.>> <> <> <<>> Get: PROC [self: PixelArray, i: NAT _ 0, s, f: INT] RETURNS [Sample]; <<... returns the sample value with indices [i, s, f].>> <> GetSamples: PROC [self: PixelArray, i: NAT _ 0, s, f: INT _ 0, samples: SampleBuffer, start: NAT _ 0, count: NAT _ maxCount]; <<... fetches a run of samples into a buffer. The effect is:>> <> <> <> <> GetPixels: PROC [self: 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 [self: 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 [self: PixelArray] RETURNS [PixelArray]; <<... makes an immutable copy of a pixel array; returns self if self.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 [map: PixelMap, scanMode: ScanMode, immutable: BOOL _ FALSE] RETURNS [PixelArray]; <> <> FromAIS: PROC [name: ROPE] RETURNS [PixelArray]; <<... makes a pixel array from an AIS file with the specified name.>> <> <> <<>> Join3AIS: PROC [name1, name2, name3: ROPE] RETURNS [PixelArray]; <> <> <<>> END.