ImagerTransform: CEDAR DEFINITIONS = BEGIN Pair: TYPE ~ RECORD [x, y: REAL]; Rectangle: TYPE ~ RECORD [x, y, w, h: REAL]; IntRectangle: TYPE ~ RECORD [x, y, w, h: INTEGER]; Transformation: TYPE ~ REF TransformationRep; TransformationRep: TYPE ~ PRIVATE RECORD [a, b, c, d, e, f: --READONLY-- REAL]; TransformationRec: TYPE ~ RECORD [a, b, c, d, e, f: REAL]; Contents: PROC [m: Transformation] RETURNS [TransformationRec] ~ INLINE {RETURN [[m.a, m.b, m.c, m.d, m.e, m.f]]}; Translate: PROC [dx, dy: REAL] RETURNS [Transformation]; Scale: PROC [s: REAL] RETURNS [Transformation]; Scale2: PROC [sx, sy: REAL] RETURNS [Transformation]; Rotate: PROC [degrees: REAL] RETURNS [Transformation]; Concat: PROC [pre, post: Transformation] RETURNS [Transformation]; Invert: PROC [m: Transformation] RETURNS [Transformation]; Create: PROC [a, b, c, d, e, f: REAL] RETURNS [Transformation]; FromRec: PROC [t: TransformationRec] RETURNS [Transformation]; PreTranslate: PROC [dx, dy: REAL, m: Transformation] RETURNS [Transformation]; PreScale: PROC [s: REAL, m: Transformation] RETURNS [Transformation]; PreScale2: PROC [sx, sy: REAL, m: Transformation] RETURNS [Transformation]; PreRotate: PROC [degrees: REAL, m: Transformation] RETURNS [Transformation]; Transform: PROC [p: Pair, transform: Transformation] RETURNS [Pair]; InverseTransform: PROC [p: Pair, transform: Transformation] RETURNS [Pair]; TransformVec: PROC [p: Pair, transform: Transformation] RETURNS [Pair]; InverseTransformVec: PROC [p: Pair, transform: Transformation] RETURNS [Pair]; CloseEnough: PROC [s, t: Transformation, rangeSize: REAL _ 2000.0] RETURNS [BOOLEAN]; CloseToTranslation: PROC [s, t: Transformation, rangeSize: REAL _ 2000.0] RETURNS [BOOLEAN]; TransformRectangle: PROC [rect: Rectangle, transform: Transformation] RETURNS [Rectangle]; TransformIntRectangle: PROC [rect: Rectangle, transform: Transformation] RETURNS [IntRectangle]; SingularValues: PROC [transform: Transformation] RETURNS [Pair]; -- Returns the singular values of the non-translation portion of the transform. These are the square roots of the eigenvalues of the symmetric matrix MMT, where M is the non-translation portion. The x component is the larger of the two. These correspond to the maximum and minimum magnitudes that the image of a unit vector can achive. END. *ImagerTransform.mesa This interface provides the internal view of the procedures, structures, etc. involved in setting, modifying and using transformations in the imager. Last Edited by: Crow, July 31, 1983 3:28 pm Plass, February 7, 1984 10:44:55 am PST Wyatt, November 21, 1983 6:14 pm Access to transformation fields. These make new transformation matrices. These are accelerators for the simple operations of premultiplying by a translate, scale, or rotate. These apply the supplied transform (or its inverse) to the indicated type These test for transformations that are close to each other. Returns TRUE if for all points p such that Transform[p, s] is in [0, 0, rangeSize, rangeSize], Transform[p, s] and Transform[p, t] differ by at most 1/4 pixel. Returns TRUE if for all points p such that TransformVec[p, s] is in [0, 0, rangeSize, rangeSize], TransformVec[p, s] and TransformVec[p, t] differ by at most 1/4 pixel. These always return rectangles, thus "hard" transforms will cause a bounding box to be returned Computing singular values Ê ˜šœ™J™J™•J™—šœ™Jšœ™J™'J™ J™—JšœÏkœ ˜"šœ˜J˜Jšœœœœ˜!Jšœ œœœ˜,Jšœœœœ˜2Jšœœœ˜-Jš œœœœÏc œœ˜OJšœœœœ˜:J˜—™ J™šÏnœœœ˜GJšœœ#˜*—J˜—™'J™JšŸ œœ œœ˜8JšŸœœœœ˜/JšŸœœ œœ˜5JšŸœœ œœ˜6JšŸœœœ˜BJšŸœœœ˜:JšŸœœœœ˜?JšŸœœœ˜>J˜—™dJ™JšŸ œœ œœ˜NJšŸœœœœ˜EJšŸ œœ œœ˜KJšŸ œœ œœ˜LJ™—šÏiI™IJ™JšŸ œœ$ œ˜DJšŸœœ$ œ˜KJšŸ œœ$ œ˜GJšŸœœ$ œ˜NJ™—š <™