12.4. Affine Transformations

For mapping e.g., world to voxel coordinates, or device to world coordinates, affine transformations have to be applied. This is done with homogeneous coordinates:

Why not a 3x3 matrix? Two reasons:

  1. One cannot construct a 3x3 matrix that will translate the point (0,0,0). The zeroes in the coordinate vector cancel out all the coefficients.

  2. Transformations could not be combined by multiplying the matrices.

Affine transformations have these elementary transforms:

Figure 12.3. Matrix Multiplication

Matrix Multiplication


Look at the example Chapter 5, Defining a Region of Interest (ROI) for the module WorldToVoxel in action.

The voxel coordinate system is a continuous coordinate system. Voxel boundaries are at integer values, voxel centers are 0.5 off. To transform integer voxel indices to voxel centers in world coordinates, either add the value “0.5” to voxel indices or check the option Integer Voxel Coordinates in the modules WorldVoxelConvert, SoMLTransform, and others.

Common pitfalls