.air File Homogenous Coordinate Transformation Matrix

Definition
Displaying the native .air file matrix
Displaying modified versions of the .air file matrix
Upgrading from AIR 1.0

Definition


By definition, the homogenous coordinate transformation matrix stored in a .air file should transform internal voxel coordinate locations in an interpolated (i.e.,interpolated to cubic voxels) version of the standard file to the corresponding uninterpolated (i.e., not necessarily cubic voxels) internal voxel coordinate locations in the reslice file. By convention, the last element of the matrix should be converted to a one by dividing all elements by the last element.

Mathematically, these specifications imply that:



where:

x, y and z represent standard file internal voxel coordinates (not interpolated to cubic voxels)
x',y' and z' represent reslice file internal voxel coordinates (not interpolated to cubic voxels)

sxoom=(standard file voxel x size) / (smallest standard file voxel size)
syoom=(standard file voxel y size) / (smallest standard file voxel size)
szoom=(standard file voxel z size) / (smallest standard file voxel size)

smallest standard file voxel size=min(standard file voxel x, y and z sizes)

T is a constant.

and

is the matrix that is stored in the .air file.


Displaying the native .air file matrix

The .air file matrix can be displayed using the program scanair with the default display mode.

In the C code, the .air file transformation matrix is stored in the array 'e'. In the current version of the AIR package, the elements of this array have an orderly relationship to the .air file homogenous coordinate transformation matrix:

In version 1.0 of the AIR package, a different format was used.


Displaying modified versions of the .air file matrix


If you need a matrix that will find the voxel in the (uninterpolated) reslice file that corresponds to a voxel in the original uninterpolated version of the standard file, you can display such a matrix using the program scanair with the -v flag.

To modify the C array 'e' to display this modified matrix:

(Note that sxoom, syoom and szoom are defined above).

If you need a matrix in real world units, you can display such a matrix using the program scanair with the -r flag.

To modify the C array 'e' to display this modified matrix:

If you are using a rigid-body model, the resulting matrix should specify an orthonormal transformation (you should ignore the last row and last column of the 4x4 matrix when testing for orthonormality). Note that the origin referenced by this matrix is at the same physical location as the origin of the internal voxel coordinate system used by AIR.


Upgrading from AIR 1.0

All current AIR programs remain compatible with .air files generated by AIR 1.0 (the reverse is not true). The AIR subroutine that loads .air files uses the size of a given .air file to determine which format is appropriate and coverts AIR 1.0 data into the new format transparently.

In version 1.0 of the AIR package, the array 'e' did not have storage for the last row of the homologous coordinate transformation matrix and this row was assigned fixed values of 0,0,0 and 1. In addition, the columns of the homologous coordinate transformation matrix were assigned in a different, somewhat disorderly fashion:

AIR 1.0 required that pixels be square (i.e., that voxel x and y sizes be identical), and assumed that the voxel z size was greater than or equal to the voxel x and y size. Consequently sxoom and syoom were both equal to 1 in AIR 1.0.

Note that perspective transformations could not be represented in version 1.0 of the AIR package.


Modified: December 16, 2001

© 1995-2001 Roger P. Woods, M.D.(rwoods@ucla.edu)