ImagerPixelArrays.mesa
Copyright © 1984, Xerox Corporation. All rights reserved.
Michael Plass, August 1, 1984 9:59:33 am PDT
Doug Wyatt, August 10, 1984 2:50:42 pm PDT
DIRECTORY
ImagerTransform USING [Transformation],
ImagerPixelMaps USING [DeviceRectangle, PixelMap],
Rope USING [ROPE];
ImagerPixelArrays: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
PixelMap: TYPE ~ ImagerPixelMaps.PixelMap;
DeviceRectangle: TYPE ~ ImagerPixelMaps.DeviceRectangle;
Transformation:
TYPE ~ ImagerTransform.Transformation;
MaxSampleValues: TYPE ~ REF MaxSampleValuesRep;
MaxSampleValuesRep:
TYPE ~
RECORD [
SEQUENCE samplesPerPixel: NAT OF INT
];
PixelArray: TYPE ~ REF PixelArrayRep;
PixelArrayRep:
TYPE ~
RECORD [
sPixels, fPixels:
INT,
The size of the pixelArray, in slow and fast dimensions.
maxSampleValue: MaxSampleValues,
m: Transformation,
transformation from (s, f) coordinates to "upright" (x, y) coordinates
(see Interpress, section 4.6)
aisName:
ROPE,
A hint that indicates the source of the pixels.
This may be NIL if the pixels come from another source.
get:
PROC [
self: PixelArray,
select:
NAT,
Indicates which layer of samples is of interest.
rectangle: DeviceRectangle
The caller of get may elect to view just part of the array at one time, to avoid excessive demands on memory for large images.
] RETURNS [pixelMap: PixelMap],
The contents of the returned PixelMap are to be considered readonly.
release:
PROC [self: PixelArray, select:
NAT, pixelMap: PixelMap],
A promise not to read the pixelMap any more.
data: REF
];
PixelArrayFromAIS:
PROC[aisName:
ROPE]
RETURNS[pixelArray: PixelArray];
For compatibility, understands * in the name to refer to three separate files for the red, green, and blue separations.
PixelArrayFromPixelMaps:
PROC[pixelMaps:
LIST
OF PixelMap, m: Transformation ←
NIL]
RETURNS [pixelArray: PixelArray];
Does not copy the pixelMaps, so they should be treated as read-only data.
Letting m default to NIL is equivalent to specifying Rotate[-90].Concat[Translate[0, sPixels]], i.e., horizontal scan-lines scanned left-to-right with scan lines appearing in top-to-bottom order. (This is the most popular, "frame-buffer", orientation for a sampled image.)
ExtractPixelArray:
PROC[pixelArray: PixelArray, select:
LIST
OF
NAT]
RETURNS[PixelArray];
Extracts the selected samples from the pixel array.
JoinPixelArrays:
PROC[pixelArrays:
LIST
OF PixelArray]
RETURNS[PixelArray];
Joins multiple sample planes into one PixelArray
END.