#include <mi32/ctrlpt.h>#include <mi32/trans2dmodel.h>

Go to the source code of this file.
Defines | |
| #define | GEOMLIBEXPORT MI_DLLIMPORT |
| #define | trans2dm(ix, iy, mat, ox, oy) |
| #define | trans2dms(ix, iy, mat) |
| #define | trans2dorient(m) SIGN(m[0][0]*m[1][1]-m[1][0]*m[0][1]) |
| #define | trans2dx(ix, iy, mat) ((ix) * mat[0][0] + (iy) * mat[0][1] + mat[0][2]) |
| #define | trans2dy(ix, iy, mat) ((ix) * mat[1][0] + (iy) * mat[1][1] + mat[1][2]) |
Functions | |
| GEOMLIBEXPORT void | DisectTrans2D (const MAT3X3 mat, double *xscale, double *yscale, double *rot, double *shear) |
| GEOMLIBEXPORT int | FindBestTrans2D (int NumPoints, const CTRLPOINT *cp, MAT3X3 forward, MAT3X3 inverse) |
| GEOMLIBEXPORT int | FindBestTrans2D3 (int NumPoints, const CTRLPOINT3 *cp3, MAT3X3 forward, MAT3X3 inverse) |
| GEOMLIBEXPORT int | FindBestTrans2D3A (int NumPoints, const CTRLPOINT3 *cp3, MAT3X3 forward, MAT3X3 inverse, UINT32 flags) |
| GEOMLIBEXPORT int | FindBestTrans2DA (int NumPoints, const CTRLPOINT *cp, MAT3X3 forward, MAT3X3 inverse, UINT32 flags) |
| GEOMLIBEXPORT void | trans2d (double ix, double iy, const MAT3X3 ItoO, double *ox, double *oy) |
| GEOMLIBEXPORT void | trans2dfindinverse (const MAT3X3 fwd, MAT3X3 inv) |
| GEOMLIBEXPORT void | trans2dinit (MAT3X3 ItoO, MAT3X3 OtoI) |
| GEOMLIBEXPORT void | trans2dmatch (MAT3X3 f, MAT3X3 i, double ix, double iy, double ox, double oy) |
| GEOMLIBEXPORT void | trans2dmatrix (MAT3X3 m, const MAT3X3 mat) |
| GEOMLIBEXPORT void | trans2dmatrix1 (const MAT3X3 m, const MAT3X3 mat, MAT3X3 out) |
| GEOMLIBEXPORT void | trans2dmatrix2 (MAT3X3 atoc, MAT3X3 ctoa, const MAT3X3 atob, const MAT3X3 btoa, const MAT3X3 btoc, const MAT3X3 ctob) |
| GEOMLIBEXPORT void | Trans2DRect (const MAT3X3 trans, const DRECT2D *irect, DRECT2D *orect) |
| GEOMLIBEXPORT void | trans2drot (MAT3X3 m, MAT3X3 n, double angle) |
| GEOMLIBEXPORT void | trans2drotpt (MAT3X3 fwd, MAT3X3 inv, double angle, double ptx, double pty) |
| GEOMLIBEXPORT void | trans2dscale (MAT3X3 m, MAT3X3 n, double sx, double sy) |
| GEOMLIBEXPORT void | trans2dshear (MAT3X3 m, MAT3X3 n, double shear, int axis) |
| GEOMLIBEXPORT void | trans2dshift (MAT3X3 m, MAT3X3 n, double dx, double dy) |
Definitions for 2-D transformations and macros
| #define GEOMLIBEXPORT MI_DLLIMPORT |
| #define trans2dm | ( | ix, | |||
| iy, | |||||
| mat, | |||||
| ox, | |||||
| oy | ) |
{ double _trans2dm_tx_, _trans2dm_ty_; _trans2dm_tx_ = (ix) * mat[0][0] + (iy) * mat[0][1] + mat[0][2]; \
_trans2dm_ty_ = (ix) * mat[1][0] + (iy) * mat[1][1] + mat[1][2]; *(ox) = _trans2dm_tx_; *(oy) = _trans2dm_ty_; }
| #define trans2dms | ( | ix, | |||
| iy, | |||||
| mat | ) |
{ double _trans2dms_tx_, _trans2dms_ty_; _trans2dms_tx_ = (ix) * mat[0][0] + (iy) * mat[0][1] + mat[0][2]; \
_trans2dms_ty_ = (ix) * mat[1][0] + (iy) * mat[1][1] + mat[1][2]; (ix) = _trans2dms_tx_; (iy) = _trans2dms_ty_; }
| #define trans2dorient | ( | m | ) | SIGN(m[0][0]*m[1][1]-m[1][0]*m[0][1]) |
| #define trans2dx | ( | ix, | |||
| iy, | |||||
| mat | ) | ((ix) * mat[0][0] + (iy) * mat[0][1] + mat[0][2]) |
| #define trans2dy | ( | ix, | |||
| iy, | |||||
| mat | ) | ((ix) * mat[1][0] + (iy) * mat[1][1] + mat[1][2]) |
| GEOMLIBEXPORT void DisectTrans2D | ( | const MAT3X3 | mat, | |
| double * | xscale, | |||
| double * | yscale, | |||
| double * | rot, | |||
| double * | shear | |||
| ) |
Disect a trans2d into component parts (scale, rotation, shear).
| mat | Transformation matrix | |
| xscale | X scale passed / returned | |
| yscale | Y scale passed / returned | |
| rot | Rotation passed / returned | |
| shear | Shear passed / returned |
| GEOMLIBEXPORT int FindBestTrans2D | ( | int | NumPoints, | |
| const CTRLPOINT * | cp, | |||
| MAT3X3 | forward, | |||
| MAT3X3 | inverse | |||
| ) |
Compute "best" 2-D affine transformation for set of CTRLPOINT's.
| NumPoints | Number of points | |
| cp | Set of CTRLPOINT's | |
| forward | Forward transformation passed / returned | |
| inverse | Inverse transformation passed / returned |
| GEOMLIBEXPORT int FindBestTrans2D3 | ( | int | NumPoints, | |
| const CTRLPOINT3 * | cp3, | |||
| MAT3X3 | forward, | |||
| MAT3X3 | inverse | |||
| ) |
Compute "best" 2-D affine transformation for set of CTRLPOINT3's.
| NumPoints | Number of points | |
| cp3 | Set of CTRLPOINT3's | |
| forward | Forward transformation passed / returned | |
| inverse | Inverse transformation passed / returned |
| GEOMLIBEXPORT int FindBestTrans2D3A | ( | int | NumPoints, | |
| const CTRLPOINT3 * | cp3, | |||
| MAT3X3 | forward, | |||
| MAT3X3 | inverse, | |||
| UINT32 | flags | |||
| ) |
Find "best" affine transformation given set of control points using CTRLPOINT3 array.
| NumPoints | Number of points | |
| cp3 | Set of CTRLPOINT3's | |
| forward | Forward transformation passed / returned | |
| inverse | Inverse transformation passed / returned | |
| flags | Flags |
| GEOMLIBEXPORT int FindBestTrans2DA | ( | int | NumPoints, | |
| const CTRLPOINT * | cp, | |||
| MAT3X3 | forward, | |||
| MAT3X3 | inverse, | |||
| UINT32 | flags | |||
| ) |
Find "best" affine transformation given set of control points using CTRLPOINT array.
| NumPoints | Number of points | |
| cp | Set of CTRLPOINT's | |
| forward | Forward transformation passed / returned | |
| inverse | Inverse transformation passed / returned | |
| flags | Flags |
| GEOMLIBEXPORT void trans2d | ( | double | ix, | |
| double | iy, | |||
| const MAT3X3 | ItoO, | |||
| double * | ox, | |||
| double * | oy | |||
| ) |
Perform affine transformation on a point.
| ix | Input X coordinate | |
| iy | Input Y coordinate | |
| ItoO | Input to Output transformation | |
| ox | Output X coordinate | |
| oy | Output Y coordinate |
Find the inverse transformation.
| fwd | Input transformation | |
| inv | Output inverse transformation |
Initialize an affine transformation.
This will initialize the transformation to "identity".
| ItoO | Input to Output transformation | |
| OtoI | Output to Input transformation |
Shift forward/inverse affine transformation so specified points match.
| f | Input to Output transformation | |
| i | Output to Input transformation | |
| ix | Input x | |
| iy | Input y | |
| ox | Output x | |
| oy | Output y |
Apply a matrix to a transformation ** not reversible.
| m | Output matrix | |
| mat | Input matrix |
Apply a matrix to a transformation ** not reversible.
| m | Input matrices | |
| out | Output matrix |
| GEOMLIBEXPORT void trans2dmatrix2 | ( | MAT3X3 | atoc, | |
| MAT3X3 | ctoa, | |||
| const MAT3X3 | atob, | |||
| const MAT3X3 | btoa, | |||
| const MAT3X3 | btoc, | |||
| const MAT3X3 | ctob | |||
| ) |
Combine two affine transformations (both forward and inverse).
| atoc | Output matrices | |
| atob | Input matrices |
Apply an affine transformation to a DRECTXY.
| trans | Affine transformation | |
| irect | Input rectangle | |
| orect | Outpu rectange |
Apply a rotation to an affine transformation.
| m | Input to Output transformation | |
| n | Output to Input transformation | |
| angle | Angle to rotate by |
Rotate by ang (radians) about point x y.
| fwd | Forward transformation | |
| inv | Inverse transformation | |
| angle | Angle to rotate by | |
| ptx | Point to rotat about |
Scale image by sx, sy.
| m | Input to Output transformation | |
| n | Output to Input transformation | |
| sx | X scale | |
| sy | Y scale |
Apply a shear to an affine transformation.
| m | Input to Output transformation | |
| n | Output to Input transformation | |
| shear | Shear angle in radians (0 = no shear) | |
| axis | Axis to shear (0 = X, 1 = Y) |
1.6.1