ITK Function Reference

(V10000.1.0.60_20160308.00)
Functions
Teamcenter Matrices

Functions

TC_API int TC_matrix_euler_angle (const double mx[16], const double precision, double euler_angles[3])
 
TC_API int TC_matrix_fixup (double mx[16])
 
TC_API int TC_matrix_is_equal (const double mx1[16], const double mx2[16], bool *eq)
 
TC_API int TC_matrix_multiply (const double mx1[16], const double mx2[16], double **mx_result)
 
TC_API int TC_matrix_point_multiply (const double point[3], const double matrix[16], double **mx_result)
 
TC_API int TC_matrix_transpose (const double mx[16], double **mx_transposed)
 

Detailed Description

Function Documentation

TC_API int TC_matrix_euler_angle ( const double  mx[16],
const double  precision,
double  euler_angles[3] 
)

Computes Euler Angles (theta) from 4x4 matrix

Parameters
[in]mxInput matix for which Euler angles are needed.
[in]precisiondouble precision
[out]euler_anglesdouble vector of size 3 representing the Euler Angles
Returns
TC_API int TC_matrix_fixup ( double  mx[16])

Fixes up the rotational elements of the 4x4 matrix. If any elements are within tolerance of 0.0, 1.0, or -1.0, set that element exactly to that number. Also makes sure the matrix is orthonormal.

Parameters
[in,out]mxInput matrix for the fix up
Returns
If the matrix canot be made orthonormal, returns ITK_internal_error, otherwise returns ITK_ok
Parameters
mx(I/O) input matrix for the fix up, also returns the output matrix
TC_API int TC_matrix_is_equal ( const double  mx1[16],
const double  mx2[16],
bool *  eq 
)

Determines if two matrices are identical within tolerance

Parameters
[in]mx1Input matrix 1
[in]mx2Input matrix 2
[out]eqtrue if matrices are equal, false if they are not
Returns
ITK_ok on success, on error returns ITK_internal_error
Parameters
mx1(I) Input matrix 1
mx2(I) Input matrix 2
eq(O) true if matrices are equal, false if they are not
TC_API int TC_matrix_multiply ( const double  mx1[16],
const double  mx2[16],
double **  mx_result 
)

Multiplies two 4 by 4 matrices.

Parameters
[in]mx1Input matrix 1
[in]mx2Input matrix 2
[out]mx_resultResulting Matrix after multiplication of mx1 and mx2
Returns
ITK_ok on success, on error returns ITK_internal_error
Parameters
mx1(I) Input matrix 1
mx2(I) Input matrix 2
mx_result(OF) 16 Resulting Matrix after multiplication of mx1 and mx2
TC_API int TC_matrix_point_multiply ( const double  point[3],
const double  matrix[16],
double **  mx_result 
)

Multiplies a point though a 4 by 4 matrix. Return the resulting point.

Parameters
[in]pointCoordinates of the point
[in]matrixTransformation matrix with which the point is multiplied
[out]mx_resultCoordinates of the new (transformed) point
Returns
ITK_ok on success, on error returns ITK_internal_error
Parameters
point(I) coordinates of the point
matrix(I) transformation matrix with which the point is multiplied
mx_result(OF) 3 coordinates of the new (transformed) point
TC_API int TC_matrix_transpose ( const double  mx[16],
double **  mx_transposed 
)

Transposes a 4 by 4 matrix.

Parameters
[in]mxInput matrix that needs to be transposed
[out]mx_transposedTransposed matrix
Returns
ITK_ok on success, on error returns ITK_internal_error
Parameters
mx(I) Input matrix that needs to be transposed
mx_transposed(OF) 16 Transposed matrix