The affine model requires that lines that are parallel before
transformation remain parallel after transformation. In the AIR
package, the affine model is parameterized in terms of twelve
parameters defined below. These parameters do not involve explicit
definition of rotations, etc.
The affine transformation for converting from an internal coordinate
in the standard file to the corresponding internal coordinate in the
reslice file is best expressed as a
homogenous transformation matrices:
(reslice file internal coordinates)=A*(standard file internal
coordinates)
A=
where:
a,b,c,d,e,f,g,h,i,j,k and m are independent parameters
Since the .air file format requires that the matrix stored there
represents a transformation that will convert coordinates from a
version of the standard file that has been interpolated to cubic
voxels, the matrix A must be modified before storage in a .air
file.
This is accomplished by:
Initialization files for the affine model consist of the following in ASCII format:
The default initialization for this model was modified in AIR 5.1 to make it identical to the default for other models even when voxel sizes in the two files are different
If no initialization file is specified, the default initialization for programs using an affine model is:
where:
This results in the exact centers of the two files being aligned to one another.
There are many different ways to define an affine transformation. Without explicit equations such as those provided above, the terms a,b,c,d,e,f,g,h,i,j,k and m are ambiguous. Aside from d, h and m which specify x-, y- and z-axis shifts respectively in a version of the reslice file that has been interpolated to cubic voxels and which are expressed in units of cubified voxels, the physical meanings of the other parameters are difficult to interpret in isolation.
If your alternative package generates a linear algebraic transformation matrix of its own, don't forget that transformation matrices are dependent upon the coordinate system used and that the AIR internal coordinate system used to define transformation matrices may differ from that of your alternative package.