The perspective model requires only that points that line on a line before transformation remain on a line after transformation. In the AIR package, the perspective model is parameterized in terms of fifteen parameters defined below. These parameters do not involve explicit definition of rotations, etc.
The perspective 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 matrix:
(reslice file internal coordinates)=Q*(standard file internal coordinates)
Q=
where:
a,b,c,d,e,f,g,h,i,j,k,m,n,p and q 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 Q 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 a perspective transformation. Without explicit equations such as those provided above, the terms a,b,c,d,e,f,g,h,i,j,k,m,n, p and q 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.