Woolz Image Processing  Version 1.8.3
WlzAffineTransform.c File Reference

Functions for computing affine transforms and applying them to objects. More...

Functions

int WlzAffineTransformDimension (WlzAffineTransform *tr, WlzErrorNum *dstErr)
 Computes the dimension of the given affine transform. More...
 
int WlzAffineTransformIsTranslate (WlzAffineTransform *tr, WlzObject *obj, WlzErrorNum *dstErr)
 Tests whether the given affine transform is a simple integer translation. More...
 
WlzContourWlzAffineTransformContour (WlzContour *srcCtr, WlzAffineTransform *tr, int newModFlg, WlzErrorNum *dstErr)
 Transforms the given contour. More...
 
WlzPointsWlzAffineTransformPoints (WlzPoints *srcPts, WlzAffineTransform *tr, int newPtsFlg, WlzErrorNum *dstErr)
 Transforms the given contour. More...
 
WlzBSplineWlzAffineTransformBSpline (WlzBSpline *srcBS, WlzAffineTransform *tr, int newBSFlg, WlzErrorNum *dstErr)
 Transforms the given B-spline domain. More...
 
WlzGMModelWlzAffineTransformGMModel (WlzGMModel *srcM, WlzAffineTransform *tr, int newModFlg, WlzErrorNum *dstErr)
 Transforms the given geometric model. More...
 
WlzErrorNum WlzAffineTransformGMShell (WlzGMShell *shell, WlzAffineTransform *tr)
 Transforms the shell's geometry as well as the geometries of the verticies in the shell. All the transformations are done in place. More...
 
WlzErrorNum WlzAffineTransformPrimSet (WlzAffineTransform *tr, WlzAffineTransformPrim prim)
 Sets the given transform's matrix from an affine transform primitives data structure. A composite transform \(A\) is built from the primitives with the order of composition being scale \(s\) (applied first), shear \(h\), rotation \(\theta\) and then translation \(t\) (applied last), ie:

\[ A = t \theta h s, x' = A x \]

. More...

 
WlzErrorNum WlzAffineTransformTranslationSet (WlzAffineTransform *tr, double tx, double ty, double tz)
 Sets the given transform's matrix from the given translations. More...
 
WlzAffineTransformWlzAffineTransformFromTranslation (WlzTransformType type, double tx, double ty, double tz, WlzErrorNum *dstErr)
 Constructs a new affine transform from the given translations. More...
 
WlzErrorNum WlzAffineTransformScaleSet (WlzAffineTransform *tr, double sx, double sy, double sz)
 Sets the given transform's matrix from the given scales. More...
 
WlzAffineTransformWlzAffineTransformFromScale (WlzTransformType type, double sx, double sy, double sz, WlzErrorNum *dstErr)
 Constructs a new affine transform from the given scales. More...
 
WlzErrorNum WlzAffineTransformRotationSet (WlzAffineTransform *tr, double rx, double ry, double rz)
 Sets the given transform's matrix from the given rotations. Although the 3 rotations contain redundant information this may be a useful method for setting rotation transforms. The order of composition is R = Rz.Ry.Rx, x' = R.x. More...
 
WlzAffineTransformWlzAffineTransformFromRotation (WlzTransformType type, double rx, double ry, double rz, WlzErrorNum *dstErr)
 Constructs a new affine transform from the given rotations. More...
 
WlzErrorNum WlzAffineTransformPrimGet (WlzAffineTransform *tr, WlzAffineTransformPrim *prim)
 Gets the given 2D transform's primitives from it's matrix. More...
 
WlzErrorNum WlzAffineTransformMatrixSet (WlzAffineTransform *trans, double **matrix)
 Sets the given transform from the given matrix. More...
 
WlzErrorNum WlzAffineTransformPrimValSet (WlzAffineTransform *tr, double trX, double trY, double trZ, double trScale, double trTheta, double trPhi, double trAlpha, double trPsi, double trXsi, int trInvert)
 Sets a 2D affine transform from the given primitives. More...
 
WlzAffineTransformWlzAffineTransformFromMatrix (WlzTransformType type, double **matrix, WlzErrorNum *dstErr)
 Makes a new affine transform of the given type and then sets it's matrix. More...
 
WlzAffineTransformWlzAffineTransformFromPrimVal (WlzTransformType type, double trX, double trY, double trZ, double trScale, double trTheta, double trPhi, double trAlpha, double trPsi, double trXsi, int trInvert, WlzErrorNum *dstErr)
 Makes a new affine transform from the given primitive transform properties. More...
 
WlzAffineTransformWlzAffineTransformFromSpin (double spX, double spY, double spTheta, WlzErrorNum *dstErr)
 Makes a new 2D affine transform from the given spin angle and centre of rotation. More...
 
WlzAffineTransformWlzAffineTransformFromSpinSqueeze (double spX, double spY, double spTheta, double sqX, double sqY, WlzErrorNum *dstErr)
 Makes a new 2D affine transform from the given spin angle, centre of rotation and scale factors. More...
 
WlzAffineTransformWlzAffineTransformCopy (WlzAffineTransform *tr, WlzErrorNum *dstErr)
 Copies the given affine transform. More...
 
WlzAffineTransformWlzAffineTransformProduct (WlzAffineTransform *tr0, WlzAffineTransform *tr1, WlzErrorNum *dstErr)
 Computes the product of the two given affine transforms \(T_1 T_0\). More...
 
WlzAffineTransformWlzAffineTransformInverse (WlzAffineTransform *tr, WlzErrorNum *dstErr)
 Computes the inverse of the given affine transform. More...
 
int WlzAffineTransformIsIdentity (WlzAffineTransform *trans, WlzErrorNum *dstErr)
 Checks whether the given transform is an identity transform. This function is equivalent to WlzAffineTransformIsIdentityTol() with a tolerances of 1.0e-06. More...
 
int WlzAffineTransformIsIdentityTol (WlzAffineTransform *trans, double tolTn, double tolTx, WlzErrorNum *dstErr)
 Checks whether the given transform is an identity transform using the given tolerance. If any of the transform parameters deviates from those an identity transform my more than +/- the given tolerance the transform is not considered an identity transform. More...
 
WlzObjectWlzAffineTransformObj (WlzObject *srcObj, WlzAffineTransform *trans, WlzInterpolationType interp, WlzErrorNum *dstErr)
 Applies the given affine transform to the given Woolz object. More...
 
WlzObjectWlzAffineTransformObjCb (WlzObject *srcObj, WlzAffineTransform *trans, WlzInterpolationType interp, void *cbData, WlzAffineTransformCbFn cbFn, WlzErrorNum *dstErr)
 Applies the given affine transform to the given Woolz object. The interpolation data and function may both be NULL unless the interpolation type is WLZ_INTERPOLATION_CALLBACK in which case the interpolation callback function will be called for each interpolated value. More...
 
WlzIVertex2 WlzAffineTransformVertexI2 (WlzAffineTransform *trans, WlzIVertex2 srcVtx, WlzErrorNum *dstErr)
 Transforms the given WlzIVertex2. More...
 
WlzIVertex3 WlzAffineTransformVertexI3 (WlzAffineTransform *trans, WlzIVertex3 srcVtx, WlzErrorNum *dstErr)
 Transforms the given WlzIVertex3. More...
 
WlzFVertex2 WlzAffineTransformVertexF2 (WlzAffineTransform *trans, WlzFVertex2 srcVtx, WlzErrorNum *dstErr)
 Transforms the given WlzFVertex2. More...
 
WlzFVertex3 WlzAffineTransformVertexF3 (WlzAffineTransform *trans, WlzFVertex3 srcVtx, WlzErrorNum *dstErr)
 Transforms the given WlzFVertex3. More...
 
WlzDVertex2 WlzAffineTransformVertexD2 (WlzAffineTransform *trans, WlzDVertex2 srcVtx, WlzErrorNum *dstErr)
 Transforms the given WlzDVertex2. More...
 
WlzDVertex3 WlzAffineTransformVertexD3 (WlzAffineTransform *trans, WlzDVertex3 srcVtx, WlzErrorNum *dstErr)
 Transforms the given WlzDVertex3. More...
 
WlzDVertex2 WlzAffineTransformNormalD2 (WlzAffineTransform *trans, WlzDVertex2 srcNrm, WlzErrorNum *dstErr)
 Transforms the given WlzDVertex2 which is a normal. More...
 
WlzDVertex3 WlzAffineTransformNormalD3 (WlzAffineTransform *trans, WlzDVertex3 srcNrm, WlzErrorNum *dstErr)
 Transforms the given WlzDVertex3 which is a normal. More...
 
WlzIBox2 WlzAffineTransformBBoxI2 (WlzAffineTransform *tr, WlzIBox2 srcBox, WlzErrorNum *dstErr)
 Transforms the given WlzIBox2. More...
 
WlzDBox2 WlzAffineTransformBBoxD2 (WlzAffineTransform *tr, WlzDBox2 srcBox, WlzErrorNum *dstErr)
 Transforms the given WlzDBox2. More...
 
WlzIBox3 WlzAffineTransformBBoxI3 (WlzAffineTransform *tr, WlzIBox3 srcBox, WlzErrorNum *dstErr)
 Transforms the given WlzIBox3. More...
 
WlzDBox3 WlzAffineTransformBBoxD3 (WlzAffineTransform *tr, WlzDBox3 srcBox, WlzErrorNum *dstErr)
 Transforms the given WlzDBox3. More...
 

Detailed Description

Functions for computing affine transforms and applying them to objects.

Author
Richard Baldock, Bill Hill
Date
March 1999
Version
Id
341a9e7fbd20db78a891053192ac91fa5d9a4908
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Todo:

Shear not yet implemented for 3D when setting an affine transform from primatives.

Getting the primatives from a 3D affine transform has not been implemented.