Spatial normalization is a key process in cross-sectional studies of brain structure and function using MRI, fMRI, PET and other imaging techniques. A wide range of 2D surface and 3D image deformation algorithms have been developed, all of which involve design choices that are subject to debate. Moreover, most have numerical parameters whose value must be specified by the user. This paper proposes a principled method for evaluating design choices and choosing parameter values. This method can also be used to compare competing spatial normalization algorithms. We demonstrate the method through a performance analysis of a nonaffine registration algorithm for 3D images and a registration algorithm for 2D cortical surfaces.