AIR 3.0 allows voxel sizes to be anisotropic in all three directions. The real world voxel sizes are stored in the header files and can be displayed with scanheader. If the values are incorrect, they can be modified with fixheader. The voxel dimensions in the header must always be the actual, objectively determined dimensions. Incorrect specification of voxel dimensions will invalidate many of the spatial transformation models used in the AIR package.
You should adopt a standard unit of measure for the header file voxel sizes (millimeters is recommended) and apply the standard without exception. It is critical to the mathematical models in the AIR package that all voxel sizes be expressed in the same units.
Some of the programs in the AIR package have defaults or options to interpolate output files to cubic voxels. Indeed, the matrix stored in .air files specifies a transformation that will generate cubic voxels. The smallest of the three target voxel sizes (x size, y size or z size) becomes the voxel size of the interpolated volume. The origin of the internal coordinate system is used as the origin for the interpolation. The interpolation homogenous coordinate transformation matrix is:
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)
Using this matrix to define the interpolation function, the location of the first voxel in the file (x=y=z=0) is unaltered by the transformation. The AIR package will only interpolate within the boundaries of the uniterpolated data, it will not extrapolate outside these boundaries. The total number of interpolated points along a given dimension that can be generated without extrapolating beyond the boundaries of the original data is given by the equation:
newdim=int((vox / ssize)*(dim-1)+1)
The fact that the AIR package will not extrapolate outside the boundaries of the original uninterpolated data can result in post-interpolations file dimensions that are different from those that you might expect. For example, if your file has a voxel x size of 2.5 and a voxel y size of 1.25, interpolation will lead to an x dimension that is twice the original x dimension minus one (assuming that the z dimension is greater than or equal to 1.0).
Roundoff errors can also lead to unexpected dimensions after interpolation. If you need to round-off voxel sizes, you should round the smallest voxel size downwards and all other voxels sizes upwards to prevent loss of an entire plane of data from round-off errors during interpolation.
If you are working with two dimensional data, be sure to specify a voxel z size that is greater than or equal to the voxel x and y sizes. Otherwise, interpolation to the irrelevant voxel z size will occur in order to generate cubic voxels.
Other registration and display packages that interpolate data to cubic voxels may define the interpolation function differently (e.g., they may use the center of the file as the interpolation origin and consequently generate one less interpolated plane). The post-interpolation coordinate assigned to a given real world location can vary by as much as 1 voxel as a result of differing definitions of the interpolation transformation. If the center of the file is used as the interpolation origin by other registration and display packages, incorrect rounding of voxel sizes can lead to interpolation trucation of two planes of original data when the rounding conventions described above are not followed.
It is possible to use the program manualreslice to interpolate a file to cubic voxels or to specify a .air file to perform this transformation by specifying rotations and translations of zero and scaling factors of 1.0. Please be aware that manualreslice uses a center-of-file-as-origin model by default and consequently may not produce the same result that would have been obtained using the automatic interpolation function used elsewhere in the AIR package. To circumvent this problem, manualreslice will offer you a top-of-file-as-origin model when certain criteria suggesting that you are trying to define an interpolation function are met. If you are offered this option and apply it, the result will be identical to the automatic interpolation described on this page.